iostream warning in 1.1.2

dwhitney@phoebe.remote.nas.nasa.gov dwhitney@phoebe.remote.nas.nasa.gov
Wed Mar 31 19:28:00 GMT 1999


In any file with iostream.h included, there is now this warning:

/usr/local/include/g++/iostream.h:50: warning: invalid type `void *' for default argument to `ostream *'

This isn't fatal, but annoying.  Is there a #define or -W to get around this?
I did not see this behavior in egcs 1.1.1.

The line in question is:

  public:
    ostream() { }
    ostream(streambuf* sb, ostream* tied=NULL);

Where NULL is apparently (void*)0 intead of 0.  I did not define NULL, it is
the ssytem default.  I've had many problems elsewhere with NULL being
(void*).  Is there a way to force NULL to be 0 instead?  I dont want to
define it myself, the system should.

Thanks,
Dave


More information about the Gcc-bugs mailing list