freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pooma-dev] signed == signed - sizeof(...), and other warning s... (


From: Jeffrey Oldham
Subject: Re: [pooma-dev] signed == signed - sizeof(...), and other warning s... (non-POOMA C++ questions)
Date: Tue, 1 May 2001 13:25:38 -0700
User-agent: Mutt/1.2.5i

On Tue, May 01, 2001 at 01:10:27PM -0700, James Crotinger wrote:
> I guess this is just part of C's wonderful promotion rules - I found it in
> K&R. This is harmless, but annoying. 

I like the signed vs. unsigned warnings because it reveals type
mismatches.  To prevent gcc from producing the warning, use the
command-line option `-Wno-sign-compare'.

> -----Original Message-----
> From: James Crotinger [mailto:address@hidden
> Sent: Tuesday, May 01, 2001 2:07 PM
> To: Mark Mitchell (E-mail)
> Cc: 'address@hidden'
> Subject: [pooma-dev] signed == signed - sizeof(...), and other warnings...
> (non-POOMA C++ questions)
> 
> 
> 
> Hey Mark. Just a couple of C++ (non-Pooma related) questions. I was 
> somewhat surprised that -Wall flagged the following code with a 
> warning: 
> 
>   void bar() 
>   { 
>     int a, b; 
>     (void)(a == b - sizeof(int)); 
>   } 

Thanks,
Jeffrey D. Oldham
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]