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] PR17913:[4.0 Regression] ICE jumping into statementexpression

On Tue, 2 Nov 2004, [ISO-8859-2] Gábor Lóki wrote:
> By the way I had to declare some language hook for checking those tree
> codes which are out of the common codes (for example: SWITCH_STMT).
> So, how does the following patch sound?

Hi Gabor,

Thanks for making these changes.  From the middle-end perspective,
this patch is a great improvement.  Unfortunately, the need for a new
language hook means that I can no longer approve such a patch myself.

There's also the possibility that different front-ends might want to
resolve this issue differently, c.f. Steven's comments.  Again from
the middle-end perspective, the fact that the optimizers and RTL expanders
can no longer handle jumps into or out of expression statements is a
regression, and fixing "fold" to support front-end languages that may
need/require that functionality is clearly a good thing.

But the other school of thought is that the C and/or C++ front-ends
may decide to deprecate this functionality (as a GCC extension) and
instead issue a suitable diagnostic warning/error.

Either way it looks like the ball is now out of my court.  Again many
thanks for switching to regression fixing mode.  Hopefully, someone will
approve your patch, or propose an alternate strategy for their front-end.

> 2004-11-02  Gabor Loki  <>
> 	* c-types.c (build_conditional_expr): Remove reducing cond_expr.
> 	* fold-const.c (fold): Expand the condition of reducing cond_expr.
> 	(contains_label_1,contains_label_2,contains_label_p): New functions
> 	for checking labels in a sub-tree.
> 	* langhooks.c (lhd_mask_label_p): New dummy function.
> 	* langhooks-def.h (lhd_mask_label_p): Define prototype, and macro.
> 	* langhooks.h (mask_label_p): Prototype.
> 	* c-objc-common.h: Macro redefine.
> 	* cp-objcp-common.h: Same.
> 	* c-common.c (c_mask_label_p): New function for checking those
> 	language specific tree code which can mask label.
> 	* c-common.h (c_mask_label_p): Prototype.
> 	* testsuite/gcc.c-torture/compile/pr17913.c: Test case.


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