This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [ECGS] linux libio status
- To: Olivier dot Galibert at mines dot u-nancy dot fr (Olivier Galibert)
- Subject: Re: [ECGS] linux libio status
- From: chip at atlantic dot net
- Date: Wed, 15 Oct 1997 09:05:42 -0400 (EDT)
- Cc: egcs at cygnus dot com
- Reply-To: chip at pobox dot com
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