regarding type promotion

Richard Harvey Chapman hchapman@3gfp.com
Tue Aug 19 22:07:00 GMT 2008


Ian Lance Taylor wrote:
> That's why gcc warns about it, with -Wparentheses, which is part of
> -Wall.
Interesting. I've never noticed that. I guess it is because g++ doesn't 
warn about it. Is this a bug in g++?

Thanks,

H.

hchapman@anthrax:~$ gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

hchapman@anthrax:~$ gcc -Wall -o a a.c
a.c: In function "main":
a.c:9: warning: suggest parentheses around comparison in operand of &
hchapman@anthrax:~$ g++ -Wall -o a a.c
hchapman@anthrax:~$



More information about the Gcc-help mailing list