This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Solaris specific g++ bug...
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Solaris specific g++ bug...
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Date: Fri, 20 Oct 2000 18:38:40 +0200
- Cc: Cedric dot Barthou at sophia dot inria dot fr
The following program compiles fine with 2.97 20001010 i686-pc-linux-gnu but not with the same
compiler for solaris 2.6 (sparc-sun-solaris2.6).
On the solaris machine, the link phase fails with the following message:
ithaque->g++ test.C
/var/tmp/ccRgMSdQ.o: In function `io_error::io_error(basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> > const &)':
/var/tmp/ccRgMSdQ.o(.io_error::gnu.linkonce.t.(basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> > const &)+0x10): undefined reference to `runtime_error::runtime_error(basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> > const &)'
collect2: ld returned 1 exit status
Has someone have a clue about what is happening ???
As a side note both compilers where bootstrapped with:
--enable-threads=posix --enable-shared --with-gnu-as --with-gnu-ld
############################ test.C ##########################################
// Compile, don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Theodore.Papadopoulo 23 Jun 2000 <Theodore.Papadopoulo@sophia.inria.fr>
#include <string>
#include <stdexcept>
class io_error: public runtime_error {
public:
io_error(const string& what_arg):runtime_error(what_arg) { }
~io_error() { }
};
int
main()
{
throw io_error("toto");
return 1;
}
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------
PGP signature