signed == signed - sizeof(...), and other warnings... (non-POOMA C++ questions)

Mark Mitchell mark at codesourcery.com
Tue May 1 23:29:51 UTC 2001


>>>>> "James" == James Crotinger <JimC at proximation.com> writes:

    James> This compiles and works just fine. The proper destructor is
    James> called since it is called through the virtual function
    James> release(). But I still get the warning.

Right.  

The compiler issues a warning because these kinds of things
*typically* indicate a problem.  (If they *always* indicated a
problem, the committee would have made them illegal, and they'd
probably be errors.)

You can come up with a case where almost any warning is unjustified --
heck I can even show you cases where you really want to call functions
without first providing a prototype for maximum portability.

I don't think the problem is the warning per se; it's that G++ doesn't
give you any way to say "look, I know what I'm doing with this class,
please shut up".

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com



More information about the pooma-dev mailing list