I have been able to reproduce my problem with the following simple code snippet:
/////////////////////////////////////////////// #include <iostream> #include <exception> main(int argc, char* argv[]) { std::out_of_range zax("Hello World"); std::cout << "It is " << zax.what() << std::endl; } /////////////////////////////////////////////// I am getting the following syntax errors: Exception-test.cpp: In function `int main(int, char**)': Exception-test.cpp:7: error: `out_of_range' undeclared in namespace `std' Exception-test.cpp:7: error: parse error before `(' token Exception-test.cpp:8: error: `zax' undeclared (first use this function) Exception-test.cpp:8: error: (Each undeclared identifier is reported only once for each function it appears in.) This is happening on g++ version 3.3.1 The code compiles fine with the native Solaris compiler -- Summary: Syntax errors with standard C++ exceptions Product: gcc Version: 3.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kpbhat at sta dot samsung dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30646