[Bug c/36299] spurious and undocumented warning with -Waddress for a == 0 when a is an array
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu May 22 20:01:00 GMT 2008
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-05-22 20:00 -------
if (a == 0)
return 1;
else if (a == (void *) 0)
Those two should warn about being address being zero. "a" decays to a pointer
type and really &a[0].
-- Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36299
More information about the Gcc-bugs
mailing list