This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30646] New: Syntax errors with standard C++ exceptions
- From: "kpbhat at sta dot samsung dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2007 21:20:11 -0000
- Subject: [Bug c++/30646] New: Syntax errors with standard C++ exceptions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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