This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [patch] Fix PR c++/22508 ICE after invalid operator new


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


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