This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]