This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/22508 ICE after invalid operator new
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 05 Aug 2005 15:58:25 -0700
- Subject: Re: [patch] Fix PR c++/22508 ICE after invalid operator new
- References: <tkrat.e5c18551089abf2b@igpm.rwth-aachen.de>
Volker Reichelt wrote:
Consider the testcase
struct A
{
void* operator new(__SIZE_TYPE__) throw(X);
};
A* p = new A;
I rather think we should fix this by just ignoring the exception
specification on the operator when its invalid.
The problem with keeping around invalid trees is that it's so easy to
fall over them. I think that we should try to work in the direction
that whatever trees we keep are actually reasonable, rather than full of
error_mark_nodes.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304