PR c/64856
* c-typeck.c (process_init_element): Don't always wrap
COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
initializing a range of elements.
* gcc.dg/pr64856.c: New test.
From-SVN: r220550
+2015-02-09 Marek Polacek <polacek@redhat.com>
+
+ PR c/64856
+ * c-typeck.c (process_init_element): Don't always wrap
+ COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
+ initializing a range of elements.
+
2015-02-04 Jakub Jelinek <jakub@redhat.com>
PR c/64824
PR c/64868
* c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
-2015-02-02 Bruno Loff <bruno.loff@gmail.com>
+2015-02-02 Bruno Loff <bruno.loff@gmail.com>
* c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
processing enum declaration.
/* If value is a compound literal and we'll be just using its
content, don't put it into a SAVE_EXPR. */
if (TREE_CODE (value.value) != COMPOUND_LITERAL_EXPR
- || !require_constant_value
- || flag_isoc99)
+ || !require_constant_value)
{
tree semantic_type = NULL_TREE;
if (TREE_CODE (value.value) == EXCESS_PRECISION_EXPR)
+2015-02-09 Marek Polacek <polacek@redhat.com>
+
+ PR c/64856
+ * gcc.dg/pr64856.c: New test.
+
2015-02-09 Jakub Jelinek <jakub@redhat.com>
PR target/64979
--- /dev/null
+/* PR c/64856 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct A {
+ unsigned long b;
+};
+
+struct B {
+ struct A c[5];
+};
+
+struct B d = { .c = { [0 ... 4] = (struct A){ .b = 2 } } };