Something's wrong with recent g++ include files

David Ronis ronis@ronispc.chem.mcgill.ca
Fri Dec 1 10:39:00 GMT 2000


Hi,

Something broke with recent C++ include files.  For example, the following 
code:

-------------------------------------------------------
#include <iostream.h>
int main(){ cout << "Hello World!" << endl; return 0;}
-------------------------------------------------------

gives:

/usr/bin/g++ -v -save-temps foo.c++
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
Configured with: ../gcc/configure --host=i686-pc-linux-gnu --prefix=/usr --with-gnu-as --enable-shared --with-gnu-ld --enable-threads=posix
gcc version 2.97 20001127 (experimental)
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.97/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUC_MINOR__=97 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ foo.c++ foo.ii
GNU CPP version 2.97 20001127 (experimental) (cpplib) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/qt/include
 /usr/include/g++-v3
 /usr/local/include
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.97/include
 /usr/i686-pc-linux-gnu/include
 /usr/include
End of search list.
foo.c++:1:22: iostream.h: No such file or directory

Sure enough, /usr/include/g++-v3 contains iostream, but not iostream.h
(or most other .h files), moreover when I change the include to
iostream (which can't be correct) I still get an error that cout and
endl aren't defined.  The preprocessed file for this case is attached.

This used to work a snapshot or so ago.


David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.ii.bz2
Type: application/x-bzip2
Size: 47983 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20001201/345974bb/attachment.bz2>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.s.bz2
Type: application/x-bzip2
Size: 1043 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20001201/345974bb/attachment-0001.bz2>


More information about the Gcc-bugs mailing list