This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

vector/algorithm breaks iostream?



EGCS 19990502, v3 checked out today, i586-pc-linux-gnu.

Including <iostream> works fine, but if <vector> or <algorithm> are
previously included, then output operations to standard {output,error} are
never seen.  This is not to imply that vector and algorithm are the only
headers that cause this problem; it just happens that those are the two I
was working with at the time.

Later tonight I'll try to step through in gdb.


The source of a simple testcase is:

#ifdef BREAKME
#  if (BREAKME == 1)
#    include <vector>
#  elif (BREAKME == 2)
#    include <algorithm>
#  endif
#endif

#include <iostream>

int main ()
{
    std::cerr << "Some text!";
    std::cerr << std::endl;
}


The output of the three combinations is:

    [skylab 156]> g++ -I$HOME/3/include/g++-v3 -L$HOME/3/lib
                  -DBREAKME=1 simple.cc
    [skylab 157]> ./a.out
    [skylab 158]> g++ -I$HOME/3/include/g++-v3 -L$HOME/3/lib
                  -DBREAKME=2 simple.cc
    [skylab 159]> ./a.out
    [skylab 160]> g++ -I$HOME/3/include/g++-v3 -L$HOME/3/lib
                  simple.cc
    [skylab 161]> ./a.out
    Some text!
    [skylab 162]> 


The output of "g++ -v --save-temps -Iallthatstuff -Lallthatstuff -DBREAKME=1
simple.cc" is here, and simple.ii.gz (44Kb after gzip -9) is attached.


Reading specs from
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/specs
gcc version egcs-2.93.21 19990502 (gcc2 ss-980929 experimental)
 /home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/cpp
-lang-c++ -v -I/home/pedwards/3/include/g++-v3 -D__GNUC__=2 -D__GNUG__=2
-D__cplusplus -D__GNUC_MINOR__=93 -D__ELF__ -Dunix -D__i386__ -Dlinux
-D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux
-Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386
-D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__
-DBREAKME=1 simple.cc simple.ii
GNU CPP version egcs-2.93.21 19990502 (gcc2 ss-980929 experimental) (i386
Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /home/pedwards/3/include/g++-v3
 
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/../../../../i
nclude/g++-2
 
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/../../../../i
586-pc-linux-gnu/include
 /home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/local/include
End of omitted list.
 /home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/cc1plus
simple.ii -quiet -dumpbase simple.cc -version -o simple.s
GNU C++ version egcs-2.93.21 19990502 (gcc2 ss-980929 experimental)
(i586-pc-linux-gnu) compiled by GNU C version egcs-2.93.21 19990502 (gcc2
ss-980929 experimental).
 as -V -Qy -o simple.o simple.s
GNU assembler version 2.9.1 (i686-pc-linux-gnu), using BFD version
2.9.1.0.15
 /home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/collect2 -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/crtbegin.o
-L/home/pedwards/3/lib
-L/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21
-L/home/pedwards/EGCS/lib simple.o -lstdc++ -lm -lgcc -lc -lgcc
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/crtend.o
/usr/lib/crtn.o




simple.ii.gz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]