This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: exception checking
- From: Michal Liptak <liptak at isdd dot sk>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 3 Mar 2003 07:57:23 +0100
- Subject: Re: exception checking
- References: <20030228173302.7476635d.liptak@isdd.sk><x3adgg9ifh.fsf@lifesupport.shutdown.com>
On 28 Feb 2003 13:58:10 -0800
LLeweLLyn Reese <llewelly at lifesupport dot shutdown dot com> wrote:
>Michal Liptak <liptak at isdd dot sk> writes:
>
>> Is exception checking at compile time planned to be implemented in gcc/g++?
>
>I doubt it. For one, most C++ experts think exception specifications
> would remain useless if checked at compile time.
I don't think so.. I think it would save me a lot of abort() calls.. ;)
Now I end up not specifying the thrown exceptions at the function's declaration
because of these problems..
>Two, the c++
> standard requires that an implementation shall not reject a
> program due to a mismatch in exception specifications, and/or
> catch blocks.
A warning would be enough for me.
>Three, there is no way to write an exception
> specification for a template function which is both sufficiently
> general, and significantly more restrictive than allowing anything
> to be thrown. There are further problems, some involving function
> pointers, and another involving shared libraries, but I've
> forgotten them.