On 02/09/2015 11:51 AM, Marek Polacek wrote:
> We reject the following testcase in C99 mode, because in C99 we always
> wrap COMPOUND_LITERAL_EXPR in a SAVE_EXPR when initializing a range of
> elements, even though the expression is required to be constant.  As a
> consequence, we error out with "initializer element is not constant".
> It's been like this since Roger's fold changes in 2003.  Since the default
> is now gnu11, I think we should accept the code even in C99.  So this patch
> makes the C FE treat the expression the same in both C90/C99 modes.  There
> is no need to add any pedwarns at this spot.

Ah, I see, the pedwarn already exists elsewhere.  That threw me for a bit.

The patch is ok.


r~

Reply via email to