This is the mail archive of the gcc@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]

exceptions problem in egcs


Hi!

Whenever I try to compile anything that contains any exceptions code I get
the following error:

In file included from /usr/include/g++/stdexcept:36,
                 from a.cc:2:
/usr/include/g++/string:9: conflicting types for `typedef class
basic_string<char,string_char_traits<char>,__default_alloc_template<false,0>
> string'
/usr/lib/g++-include/exception:32: previous declaration as `typedef char *
string'
In file included from a.cc:2:
/usr/include/g++/stdexcept:44: return type of `const char *
logic_error::what()
const' adds const
/usr/lib/g++-include/exception:41:   overriding definition as `char *
exception::what() const'
/usr/include/g++/stdexcept:71: return type of `const char *
runtime_error::what() const' adds const
/usr/lib/g++-include/exception:41:   overriding definition as `char *
exception::what() const'

What am I missing here? I'm using egcs 1.0.3. Acctually there isn't even
need to write any exception code, as long as I include the file
<stdexcept> I get this error. I did exactly as the installation file said.
BTW, I installed the binary-dist if that matters.

TIA,
/Tobias/




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