This is the mail archive of the 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++/28266: ICE on invalid default variable

On Sun, 2006-09-10 at 12:05 +0200, Steven Bosscher wrote:
> On Sunday 10 September 2006 09:53, Simon Martin wrote:
> > The attached patch fixes this problem the following way: if a default
> > argument is not valid (i.e. is parsed into error_mark_node), then we act as
> > if there was no default argument in the first place by setting
> > TREE_PURPOSE(...) to NULL_TREE instead of error_mark_node.
> Seems to me that you should just robustify the gimplifier.  These
> error_mark_nodes mark errors, and the rest of the compiler should
> just handle them.

The gimplifier sees:
TARGET_EXPR <D.2008, <<< Unknown tree: aggr_init_expr
  0B, <<< error >>>
  D.2008 >>>

Which the gimplifier decides to ignore partly because of the
error_mark_node.  The gimplifier has some issues sometimes ignoring
error_mark_node, I forgot the other bug which it does the same but I
posted a patch to the bug which caused a lot of error recovery issues
which I did not have time to look into at that time.

Andrew Pinski

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