C compilers generally will generate a warning when a pointer is used in a 'dangerous' way. For example... you have a routine that expects a pointer to a 'foo' instead you pass it a 'bar' a standard compliant compiler will generate an error, however back in the K&R days this would either not be caught at all or would only generate a warning. Another example: you have a routine that expects a non-const pointer to a char instead you pass it a const pointer to a char this should be an error in a standard-compiant compiler, but.... A third example: you're compiler implements some non-ansi standard characteristics of pointers ie: near vs. far, __gc, rom, based, bank_n, ..., whatever. you pass the wrong flavor of pointer if the compiler can't make it work it _should__ generate an error if the compiler can make it work, perhaps with some loss of efficiency that might be a good cause for a warning. Bob Ammerman RAm Systems ----- Original Message ----- From: "Jennifer L. Gatza" To: Sent: Monday, August 19, 2002 2:23 PM Subject: FW: [PIC]: C-18 pointers to global variables... > Oops... resending to list this time. > > -----Original Message----- > From: Jennifer L. Gatza [mailto:jenl@auto-serv.com] > Sent: Monday, August 19, 2002 12:55 PM > To: 'mike@broadcastwarehouse.com' > Subject: RE: [PIC]: C-18 pointers to global variables... > > > Someone more familiar with C18 may have better advice, but I've seen that > ugly "suspicious pointer conversion" warning many times when I *know* that > there is nothing wrong with the conversion. I'm not sure what the compiler > uses as criteria for the warning, but it seems to me like it appears anytime > I use the * or & operators. It's almost like a checklist - "You referred to > a variable by something other than its default form (whether value or > reference). Is this what you intended to do?" > > I'm with you: I hate warnings. But for the most part, I've found this > warning to be less than useful and have learned to ignore it, provided the > code works as expected. I haven't had any problems. > > Jen > > > > Can anyone help me - I'm trying to pass a pointer to a large-ish (312) > > element global array variable and am getting a suspicious pointer > > conversion warning. > > > > > The code does actually work - but I don't like warnings!! > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu