This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Linker Error with STL and egcs 1.1b


-----BEGIN PGP SIGNED MESSAGE-----

Hello,

Compiling this simple program from SGI's documentation:

===
#include <rope>

int
main()
{
  crope u(100, 'x');
}
===

causes an unpleasant linker error with egcs 1.1b ("gcc version
egcs-2.91.57 19980901 (egcs-1.1 release)"):

===
heiler@athena:/home/heiler/src/diverse/archive > g++ egcs_bug2.cc
In file included from /usr/local/egcs-1.1/include/g++/stl_rope.h:2107,
                 from /usr/local/egcs-1.1/include/g++/rope.h:18,
                 from egcs_bug2.cc:1:
/usr/local/egcs-1.1/include/g++/ropeimpl.h:1085: warning: decimal
integer constant is so large that it is unsigned
/tmp/ccuoUWFE.o: In function `rope<char,
__default_alloc_template<false, 0> > power<rope<char,
__default_alloc_template<false, 0> >, unsigned int, rope<char,
__default_alloc_template<false, 0> >::concat_fn>(rope<char,
__default_alloc_template<false, 0> >, unsigned int, rope<char,
__default_alloc_template<false, 0> >::concat_fn)':
/tmp/ccuoUWFE.o(.rope<char, __default_alloc_template<0, 0> >
gnu.linkonce.t.power<rope<char, __default_alloc_template<0, 0> >,
unsigned int, rope<char, __default_alloc_template<0, 0>
>::concat_fn>(rope<char, __default_alloc_template<0, 0> >, unsigned
int, rope<char, __default_alloc_template<0, 0> >::concat_fn)+0x1e):
undefined reference to `rope<char, __default_alloc_template<false, 0>
> identity_element<char, __default_alloc_template<false, 0>
>(rope<char, __default_alloc_template<false, 0> >::concat_fn)'
collect2: ld returned 1 exit status
===

If I invoke eg++ with "-Wall -ansi -pedantic" the compiler complains:

===
heiler@athena:/home/heiler/src/diverse/archive > g++ -Wall -ansi -pedantic egcs_bug2.cc
In file included from /usr/local/egcs-1.1/include/g++/rope:26,
                 from egcs_bug2.cc:1:
/usr/local/egcs-1.1/include/g++/stl_rope.h:847: parse error before `)'
/usr/local/egcs-1.1/include/g++/stl_rope.h:847:
`__rope_iterator<CharT,Alloc>::operator +=(...)' must take exactly one
argument
/usr/local/egcs-1.1/include/g++/stl_rope.h:847: confused by earlier
errors, bailing out
===

egcs 1.0.3 compiles and links the same program without any errors (but
with some warnings). Is any workaround or fix already available?

Thanks,

  Matthias


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAwUBNgLs3Y192C+CJQmJAQEyZgP9FyesgLfj+U6kFuPronO+O0TVowy6XEQz
t5eE/L/LkUJSPjP2+REVgWc2A6w9A+mg8hcWfXm6eOmh4ehpX75PTizTXVSBQq41
EiNKArRvT7IB9HJnuCrpwWxdF/wItXdVbLPPB2d+U3XX336Nzxf+Ube1AwEYM5GZ
XVUDQWCD0jI=
=+W+i
-----END PGP SIGNATURE-----



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