This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning for unadorned 0 in varargs lists?
Are there really any targets where passing an unadorned zero doesn't
work?
Yes; any target where ints are 32 bit, and pointers are 64 bit
(i.e., most 64-bit targets).
If there aren't, it seems somewhat inconsistent not to warn
about NULL, which is just as unportable as 0 here.
Indeed -- you have to pass a pointer of the correct type, not just
"any pointer". Any proposed attribute syntax that doesn't take
this into account is pretty worthless imho.
Segher