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]

Problem compiling with try/catch block within local class.


gcc -x c++ -O2   -DSIZEOF_INT=4 -DSIZEOF_LONG=8  -DNDEBUG  
-I../../../../src/fx/atm/MyServer/../lib/atm -I../../../../src/MyServer
-I../../../include -I/myarch/include  -I.  -O2  -c
../../../../src/MyServer/MyServer.cpp
../../../../src/MyServer/MyServer.cpp: In method `bool
MyServer::notify_closed(TCPConnection *)::Reconnect::service()':
../../../../src/MyServer/MyServer.cpp:362: warning: didn't find handler
for EH region 1529
../../../../src/MyServer/MyServer.cpp:362: warning: didn't find handler
for EH region 1534
../../../../src/MyServer/MyServer.cpp:362: warning: region exists, no
handler 1529
../../../../src/MyServer/MyServer.cpp:362: warning: region exists, no
handler 1534
../../../../src/MyServer/MyServer.cpp:362: warning: region exists, no
handler 1534
../../../../src/MyServer/MyServer.cpp:362: warning: region exists, no
handler 1529
../../../../src/MyServer/MyServer.cpp:362: Internal compiler error.
../../../../src/MyServer/MyServer.cpp:362: Please submit a full bug
report to `egcs-bugs@cygnus.com'.
make: *** [MyServer.o] Error 1



My code looks something like the following simplified pseudo-code.
If I remove the try{} and catch{} block, the code compiles OK.
Or, if I moved the local class outside of notify_closed (so it becomes
a regular class), the code also compiles OK.

MyServer::notify_closed(..)
{
   class MyClass : public BaseClass
   {
     bool service()
	{
	  try
	    {}
	  catch(...)
	    {}
	}
   }
  ..	
  MyClass x;
  x.service();
  ..
}

 
____________________________________________________________
Rakesh Bhakta   rakesh@fundsxpress.com  512-346-1771  ex 237
FundsXpress Inc.,  3435 Greystone St#106,  Austin, TX, 78731   
http://www.fundsxpress.com


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