STL-Bug under egsc-1.0

Sebastian Wilhelmi wilhelmi@ira.uka.de
Tue Dec 9 08:33:00 GMT 1997


Hi, all!

If I try to compile 

----------------------------
#include <stl.h>

vector< int > Test;

main()
{
  Test.insert( Test.begin(), 10, 1 );
}
-----------------------------

I get:

-------------------------------
wilhelmi@i81s19:~/compile/test(94)->g++ -v test.cc
Reading specs from
/home/i81fs1/wilhelmi/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.21/specs
gcc version egcs-2.90.21 971202 (egcs-1.00 release)

/home/i81fs1/wilhelmi/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.21/cpp
-lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=90 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__
-D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix
-Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -D__GCC_NEW_VARARGS__
-Acpu(sparc) -Amachine(sparc) test.cc /var/tmp/cca005L3.ii
GNU CPP version egcs-2.90.21 971202 (egcs-1.00 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 /home/i81fs1/wilhelmi/local/include/g++
 /home/i81fs1/wilhelmi/local/sparc-sun-solaris2.5.1/include

/home/i81fs1/wilhelmi/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.21/include
 /usr/include
End of search list.

/home/i81fs1/wilhelmi/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.21/cc1plus
/var/tmp/cca005L3.ii -quiet -dumpbase test.cc -version -o
/var/tmp/cca005L3.s
GNU C++ version egcs-2.90.21 971202 (egcs-1.00 release)
(sparc-sun-solaris2.5.1) compiled by GNU C version egcs-2.90.21 971202
(egcs-1.00 release).
/home/i81fs1/wilhelmi/local/include/g++/stl_vector.h:171: no type named
`iterator_category' in `int'
/home/i81fs1/wilhelmi/local/include/g++/stl_vector.h:171: no type named
`value_type' in `int'
/home/i81fs1/wilhelmi/local/include/g++/stl_vector.h:171: no type named
`difference_type' in `int'
/home/i81fs1/wilhelmi/local/include/g++/stl_vector.h:171: no type named
`pointer' in `int'
/home/i81fs1/wilhelmi/local/include/g++/stl_vector.h:171: no type named
`reference' in `int'
/home/i81fs1/wilhelmi/local/include/g++/stl_iterator.h: In function
`{error} iterator_category<int>(const int &)':
/home/i81fs1/wilhelmi/local/include/g++/stl_iterator.h:126: return-type
`{error}' is an incomplete type
/home/i81fs1/wilhelmi/local/include/g++/stl_iterator.h:126: confused by
earlier errors, bailing out
---------------------------------------

If I however change ../include/g++/stl_config.h to not to define
__STL_MEMBER_TEMPLATES for egcs-1.0 (i.e. gcc-2.8. ... ), then
everything works fine.

So if member class templates are not supported (are they?), why defining
this? (ok ok, I might as well have missed something...;-)

Regards
Sebastian
-- 
+--------------============##################============--------------+
| Sebastian Wilhelmi, Institut fuer Rechnerentwurf und Fehlertoleranz, |
| Universitaet Karlsruhe;  Gebaeude 20.20, Raum 263, D-76128 Karlsruhe |
| mail: wilhelmi@ira.uka.de; fax: +49 721 370455; fon: +49 721 6084353 |
+----------------> http://goethe.ira.uka.de/~wilhelmi <----------------+



More information about the Gcc-bugs mailing list