This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Exception specification differences
- From: Joshua Pollak <joshp at cra dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 31 Dec 2001 09:56:53 -0500
- Subject: Exception specification differences
Hello,
It is my understanding that GCC 3.x is C99 compliant with regards to
exception specification, while GCC 2.x is not. We are writing code that
will probably need to be compiled under both libraries and, of even more
concern, have quite a bit of older code.
Is there any documentation on the exception specification differences
between the GCC 2 and 3 series? Are there any compiler options that will
force GCC 3.x to handle itself similarly to 2.x in this regard?
I noticed for example that when I created a class to inherit from
std::exception, it compiled without a problem under GCC 2.95 when the class
was defined without a destructor, but under GCC 3.02, it complained about
loosening the exception specifications of std::~exception throw (). Is
there a way to disable this error or convert it to a warning?
thank you,
-Josh
--
Joshua Pollak (617) 491-3474 x586
Software Engineer joshp@cra.com
Charles River Analytics www.cra.com
---------------------------------------