public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Annoying iostream.h warning messages.
@ 1998-08-22 22:04 Viper
  1998-08-23  7:45 ` Carlo Wood
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Viper @ 1998-08-22 22:04 UTC (permalink / raw)
  To: egcs

When I use g++ (from egcs-2.91.54, latest snapshot) to compile even a very
simple "hello world" program, it results in over a page of warning
messages.  This becomes very annoying, especially when trying to debug
compiler errors for large projects that involve many different files. 

My older GNU g++ produced no warnings from iostream.h and streambuf.h.  I
have checked that my system include files match the include files provided
by the egcs distribution.  Am I doing something wrong to cause these
warning messages to come up?  Why should the system include files be
causing warnings.  Thanks.

Here is an example file called "test.cc":

-------------------------------------------
#include <iostream.h>

main()
{
  cout << "Hello world." << endl;
}
-------------------------------------------

Now, when I compile it by typing "g++ test.cc -o test", the following
warnings are produced:

In file included from /usr/include/g++/iostream.h:31,
                 from test.cc:1:
/usr/include/g++/streambuf.h:403: warning: invalid type `void *' for default argument to `ios *'
/usr/include/g++/streambuf.h: In method `streampos streambuf::pubseekoff(streamoff, enum _seek_dir, int = 3)':
/usr/include/g++/streambuf.h:362: warning: implicit declaration of function `int _IO_seekoff(...)'
/usr/include/g++/streambuf.h: In method `streampos streambuf::pubseekpos(streampos, int = 3)':
/usr/include/g++/streambuf.h:364: warning: implicit declaration of function `int _IO_seekpos(...)'
/usr/include/g++/iostream.h: At top level:
In file included from test.cc:1:
/usr/include/g++/iostream.h:50: warning: invalid type `void *' for default argument to `ostream *'
/usr/include/g++/iostream.h: In method `int ostream::opfx()':
/usr/include/g++/iostream.h:53: warning: implicit declaration of function `int _IO_flockfile(...)'
/usr/include/g++/iostream.h: In method `void ostream::osfx()':
/usr/include/g++/iostream.h:54: warning: implicit declaration of function `int _IO_funlockfile(...)'
/usr/include/g++/iostream.h: At top level:
/usr/include/g++/iostream.h:123: warning: invalid type `void *' for default argument to `ostream *'
/usr/include/g++/iostream.h:230: warning: invalid type `void *' for default argument to `ostream *'

Thanks for the help.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1998-08-24  4:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-22 22:04 Annoying iostream.h warning messages Viper
1998-08-23  7:45 ` Carlo Wood
1998-08-23 13:15   ` Viper
1998-08-23 18:16     ` Carlo Wood
1998-08-23 23:15     ` H.J. Lu
1998-08-24  4:37       ` Viper
1998-08-23  7:45 ` H.J. Lu
1998-08-23  7:45 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).