Re: [PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-16 Thread Christian Bruel
On 02/16/2012 02:14 PM, Joseph S. Myers wrote: > First, if there isn't a bug in Bugzilla for this problem please file one > so it's properly tracked if it takes a while to work out how to solve it. OK, tracked with PR52283 > As I understand it from your testcases, it's a matter of certain code

Re: [PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-16 Thread Joseph S. Myers
First, if there isn't a bug in Bugzilla for this problem please file one so it's properly tracked if it takes a while to work out how to solve it. As I understand it from your testcases, it's a matter of certain code that is not valid ISO C but you would like to be accepted unless -pedantic, by

Re: [PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-16 Thread Richard Guenther
On Thu, Feb 16, 2012 at 12:49 PM, Christian Bruel wrote: > >> >> >> On 02/15/2012 06:03 PM, Joseph S. Myers wrote: >>> On Wed, 15 Feb 2012, Christian Bruel wrote: >>> Removal of this NOP_EXPR if !CAN_HAVE_LOCATION_P fixes the problem. looks safe from my testing, because the loc is insert

Re: [PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-16 Thread Christian Bruel
> > > On 02/15/2012 06:03 PM, Joseph S. Myers wrote: >> On Wed, 15 Feb 2012, Christian Bruel wrote: >> >>> Removal of this NOP_EXPR if !CAN_HAVE_LOCATION_P fixes the problem. >>> looks safe from my testing, because the loc is inserted using >>> 'protected_set_expr_location', whereas no loc for a

Re: [PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-16 Thread Christian Bruel
On 02/15/2012 06:03 PM, Joseph S. Myers wrote: > On Wed, 15 Feb 2012, Christian Bruel wrote: > >> Removal of this NOP_EXPR if !CAN_HAVE_LOCATION_P fixes the problem. >> looks safe from my testing, because the loc is inserted using >> 'protected_set_expr_location', whereas no loc for a constant c

Re: [PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-15 Thread Joseph S. Myers
On Wed, 15 Feb 2012, Christian Bruel wrote: > Removal of this NOP_EXPR if !CAN_HAVE_LOCATION_P fixes the problem. > looks safe from my testing, because the loc is inserted using > 'protected_set_expr_location', whereas no loc for a constant case > doesn't seem to introduce new problems with the de

[PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-15 Thread Christian Bruel
Hello, This patch fixes a regression when folding a cast cond expression to a constant in case label. The problem came from the removal of the lines in c-common.c:check_case_value /* ??? Can we ever get nops here for a valid case value? We shouldn't for C. */ STRIP_TYPE_NOPS (value);