Second shot at moving arch/ into config/arch/ .
1 Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/60_all_gcc43-pr35440.patch
2 2008-03-19 Jakub Jelinek <jakub@redhat.com>
5 * c-pretty-print.c (pp_c_initializer_list): Handle CONSTRUCTOR
8 * gcc.dg/pr35440.c: New test.
10 diff -durN gcc-4.3.0.orig/gcc/c-pretty-print.c gcc-4.3.0/gcc/c-pretty-print.c
11 --- gcc-4.3.0.orig/gcc/c-pretty-print.c 2008-01-29 14:59:59.000000000 +0100
12 +++ gcc-4.3.0/gcc/c-pretty-print.c 2008-06-10 14:44:54.000000000 +0200
13 @@ -1173,6 +1173,12 @@
14 tree type = TREE_TYPE (e);
15 const enum tree_code code = TREE_CODE (type);
17 + if (TREE_CODE (e) == CONSTRUCTOR)
19 + pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
26 @@ -1207,16 +1213,12 @@
28 if (TREE_CODE (e) == VECTOR_CST)
29 pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
30 - else if (TREE_CODE (e) == CONSTRUCTOR)
31 - pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
37 - if (TREE_CODE (e) == CONSTRUCTOR)
38 - pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
39 - else if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
40 + if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
42 const bool cst = TREE_CODE (e) == COMPLEX_CST;
43 pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
44 diff -durN gcc-4.3.0.orig/gcc/testsuite/gcc.dg/pr35440.c gcc-4.3.0/gcc/testsuite/gcc.dg/pr35440.c
45 --- gcc-4.3.0.orig/gcc/testsuite/gcc.dg/pr35440.c 1970-01-01 01:00:00.000000000 +0100
46 +++ gcc-4.3.0/gcc/testsuite/gcc.dg/pr35440.c 2008-06-10 14:44:54.000000000 +0200
49 +/* { dg-do compile } */
50 +/* { dg-options "-std=gnu99" } */
53 +struct B { int i; char j[2]; };
57 + (struct A){}(); /* { dg-error "called object" } */
58 + (struct B){ .i = 2, .j[1] = 1 }(); /* { dg-error "called object" } */