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]

Re: [ECGS] linux libio status


According to Olivier Galibert:
> On Tue, Oct 14, 1997 at 11:23:49PM -0700, Joe Buck wrote:
> > We need to silence these warnings.  For the NULL, I suggest a global
> > s/NULL/0/ in the C++ iostreams headers.  There is no reason to write
> > NULL, it is just a source of problems like this (*especially* since
> > we have changed C++ to be strict about void*).
> 
> Don't use '0' but '0L'. This way you will be OK with NULL in stdargs
> when int=32b and pointer=64b.

That's not helpful in C++, because all functions must be properly
prototyped.  In any case, any programs that need NULL to be defined
to 0L are just plain broken, and in a fairly insidious way; the one
case in C++ where it might make a difference (variadic functions)
requires a cast of the NULL before it is standard-compliant anyway.
-- 
Chip Salzenberg          - a.k.a. -           <chip@pobox.com>
        "He's Mr. Big of 'Big And Tall' fame."  // MST3K


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