Bug 11653 - [3.4 Regression] can no longer include iostream
Summary: [3.4 Regression] can no longer include iostream
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.4.0
: P1 critical
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks: 11240
  Show dependency treegraph
 
Reported: 2003-07-23 23:36 UTC by Andrew Pinski
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2003-07-23 23:36:48 UTC
I can no longer just include iostream by itself.
Code:
#include <iostream>

All now I get errors:
tin:~/src/gnu/gcctest>gcc -v prnew.1.cc
Reading specs from /home/gates/pinskia/linux/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: /home/gates/pinskia/src/gnu/gcc/src/configure --target=i686-pc-linux-
gnu --host=i686-pc-linux-gnu --enable-__cxa_atexit --enable-languages=java,objc,f77 --
prefix=/home/gates/pinskia/linux --enable-threads=posix --enable-shared
Thread model: posix
gcc version 3.4 20030723 (experimental)
 /home/gates/pinskia/linux/lib/gcc-lib/i686-pc-linux-gnu/3.4/cc1plus -quiet -v -
D_GNU_SOURCE prnew.1.cc -quiet -dumpbase prnew.1.cc -mtune=pentiumpro -
auxbase prnew.1 -version -o /tmp/ccdql9H3.s
#include "..." search starts here:
#include <...> search starts here:
 /home/gates/pinskia/linux/include/c++/3.4
 /home/gates/pinskia/linux/include/c++/3.4/i686-pc-linux-gnu
 /home/gates/pinskia/linux/include/c++/3.4/backward
 /usr/local/include
 /home/gates/pinskia/linux/include
 /home/gates/pinskia/linux/lib/gcc-lib/i686-pc-linux-gnu/3.4/include
 /home/gates/pinskia/linux/i686-pc-linux-gnu/include
 /usr/include
End of search list.
GNU C++ version 3.4 20030723 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.4 20030723 (experimental).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128866
In file included from /home/gates/pinskia/linux/include/c++/3.4/ios:46,
                 from /home/gates/pinskia/linux/include/c++/3.4/ostream:45,
                 from /home/gates/pinskia/linux/include/c++/3.4/iostream:45,
                 from prnew.1.cc:1:
/home/gates/pinskia/linux/include/c++/3.4/bits/char_traits.h:191: error: `
   wstreampos' does not name a type
In file included from /home/gates/pinskia/linux/include/c++/3.4/streambuf:784,
                 from /home/gates/pinskia/linux/include/c++/3.4/ios:50,
                 from /home/gates/pinskia/linux/include/c++/3.4/ostream:45,
                 from /home/gates/pinskia/linux/include/c++/3.4/iostream:45,
                 from prnew.1.cc:1:
/home/gates/pinskia/linux/include/c++/3.4/streambuf: In instantiation of 
`std::basic_streambuf<wchar_t, std::char_traits<wchar_t> >':
/home/gates/pinskia/linux/include/c++/3.4/bits/streambuf.tcc:167:   instantiated from here
/home/gates/pinskia/linux/include/c++/3.4/streambuf:136: error: no type named `
   pos_type' in `struct std::char_traits<wchar_t>'
/home/gates/pinskia/linux/include/c++/3.4/streambuf:236: error: no type named `
   pos_type' in `struct std::char_traits<wchar_t>'
/home/gates/pinskia/linux/include/c++/3.4/streambuf:241: error: no type named `
   pos_type' in `struct std::char_traits<wchar_t>'
/home/gates/pinskia/linux/include/c++/3.4/streambuf:578: error: no type named `
   pos_type' in `struct std::char_traits<wchar_t>'
/home/gates/pinskia/linux/include/c++/3.4/streambuf:590: error: no type named `
   pos_type' in `struct std::char_traits<wchar_t>'
In file included from /home/gates/pinskia/linux/include/c++/3.4/bits/basic_ios.h:454,
                 from /home/gates/pinskia/linux/include/c++/3.4/ios:51,
                 from /home/gates/pinskia/linux/include/c++/3.4/ostream:45,
                 from /home/gates/pinskia/linux/include/c++/3.4/iostream:45,
                 from prnew.1.cc:1:
/home/gates/pinskia/linux/include/c++/3.4/bits/basic_ios.h: In instantiation of 
`std::basic_ios<wchar_t, std::char_traits<wchar_t> >':
/home/gates/pinskia/linux/include/c++/3.4/bits/basic_ios.tcc:183:   instantiated from here
/home/gates/pinskia/linux/include/c++/3.4/bits/basic_ios.h:67: error: no type 
   named `pos_type' in `struct std::char_traits<wchar_t>'
In file included from /home/gates/pinskia/linux/include/c++/3.4/ostream:548,
                 from /home/gates/pinskia/linux/include/c++/3.4/iostream:45,
                 from prnew.1.cc:1:
/home/gates/pinskia/linux/include/c++/3.4/ostream: In instantiation of 
`std::basic_ostream<wchar_t, std::char_traits<wchar_t> >':
/home/gates/pinskia/linux/include/c++/3.4/bits/ostream.tcc:712:   instantiated from here
/home/gates/pinskia/linux/include/c++/3.4/ostream:64: error: no type named `
   pos_type' in `struct std::char_traits<wchar_t>'
/home/gates/pinskia/linux/include/c++/3.4/bits/ostream.tcc:423: error: no type 
   named `pos_type' in `struct std::basic_ostream<wchar_t, 
   std::char_traits<wchar_t> >'
/home/gates/pinskia/linux/include/c++/3.4/bits/ostream.tcc:434: error: no type 
   named `pos_type' in `struct std::char_traits<wchar_t>'
In file included from /home/gates/pinskia/linux/include/c++/3.4/istream:775,
                 from /home/gates/pinskia/linux/include/c++/3.4/iostream:46,
                 from prnew.1.cc:1:
/home/gates/pinskia/linux/include/c++/3.4/istream: In instantiation of `std::basic_istream<
wchar_t, std::char_traits<wchar_t> >':
/home/gates/pinskia/linux/include/c++/3.4/bits/istream.tcc:1201:   instantiated from here
/home/gates/pinskia/linux/include/c++/3.4/istream:65: error: no type named `
   pos_type' in `struct std::char_traits<wchar_t>'
/home/gates/pinskia/linux/include/c++/3.4/bits/istream.tcc:934: error: no type 
   named `pos_type' in `struct std::basic_istream<wchar_t, 
   std::char_traits<wchar_t> >'
/home/gates/pinskia/linux/include/c++/3.4/bits/istream.tcc:947: error: no type 
   named `pos_type' in `struct std::char_traits<wchar_t>'


If I define _GLIBCPP_USE_WCHAR_T before including iostream it works.

tin:~/src/gnu/gcctest>gcc -v
Reading specs from /home/gates/pinskia/linux/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: /home/gates/pinskia/src/gnu/gcc/src/configure --target=i686-pc-linux-
gnu --host=i686-pc-linux-gnu --enable-__cxa_atexit --enable-languages=java,objc,f77 --
prefix=/home/gates/pinskia/linux --enable-threads=posix --enable-shared
Thread model: posix
gcc version 3.4 20030723 (experimental)

I think the was caused by Zack Weinberg's patch to add UCN support but I do not know 
that for sure.
Comment 1 Andrew Pinski 2003-07-23 23:38:16 UTC
Looks like Dara also gets the same error for bug 11240.
Comment 2 Phil Edwards 2003-07-25 03:29:20 UTC
fenric 108% cat d.cc
#include <iostream>
fenric 109% /mnt/build/install-2003-07-24-trunk/bin/g++ -c d.cc
fenric 110%


Works For Me![tm]

Comment 3 Andrew Pinski 2003-07-25 03:32:00 UTC
I just deleted the headers to see if they are causing the problem.  I will report back tomorrow what 
is the results.
Comment 4 Andrew Pinski 2003-07-25 14:23:23 UTC
User error of not installing in a clean destionation.