This is the mail archive of the gcc-patches@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: [c++] warn if NULL is passed through varargs


>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:

 Richard> On Fri, Oct 11, 2002 at 11:09:20AM -0400, Paul Koning wrote:
 >> So are you saying that the C standard's statement that 0 is a
 >> valid way to say "NULL pointer" is wrong, and anyone who relies on
 >> it is writing broken code?

 Richard> No, so long as sizeof(int) == sizeof(void*) for that target,
 Richard> *or* the target ABI promotes smaller integers to at least
 Richard> pointer sized in registers (like alpha, but not ia64).

I read this as a requirement on the ABI (to allow conforming C
programs to work).  The alternative amounts to saying "depending on
the ABI, your comforming C programs may or may not work" which seems
like a bad story...

     paul


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