aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
openembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.bz2
openembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.zip
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch')
-rw-r--r--recipes/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch b/recipes/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch
new file mode 100644
index 0000000000..6bf3f0d9d8
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch
@@ -0,0 +1,56 @@
+2008-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/35440
+ * c-pretty-print.c (pp_c_initializer_list): Handle CONSTRUCTOR
+ for all types.
+
+ * gcc.dg/pr35440.c: New test.
+
+--- gcc/c-pretty-print.c.jj 2008-02-11 14:48:12.000000000 +0100
++++ gcc/c-pretty-print.c 2008-03-19 14:50:09.000000000 +0100
+@@ -1173,6 +1173,12 @@ pp_c_initializer_list (c_pretty_printer
+ tree type = TREE_TYPE (e);
+ const enum tree_code code = TREE_CODE (type);
+
++ if (TREE_CODE (e) == CONSTRUCTOR)
++ {
++ pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
++ return;
++ }
++
+ switch (code)
+ {
+ case RECORD_TYPE:
+@@ -1207,16 +1213,12 @@ pp_c_initializer_list (c_pretty_printer
+ case VECTOR_TYPE:
+ if (TREE_CODE (e) == VECTOR_CST)
+ pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
+- else if (TREE_CODE (e) == CONSTRUCTOR)
+- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
+ else
+ break;
+ return;
+
+ case COMPLEX_TYPE:
+- if (TREE_CODE (e) == CONSTRUCTOR)
+- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
+- else if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
++ if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
+ {
+ const bool cst = TREE_CODE (e) == COMPLEX_CST;
+ pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
+--- gcc/testsuite/gcc.dg/pr35440.c.jj 2008-03-19 15:57:13.000000000 +0100
++++ gcc/testsuite/gcc.dg/pr35440.c 2008-03-19 15:47:35.000000000 +0100
+@@ -0,0 +1,12 @@
++/* PR c/35440 */
++/* { dg-do compile } */
++/* { dg-options "-std=gnu99" } */
++
++struct A {};
++struct B { int i; char j[2]; };
++
++void foo (void)
++{
++ (struct A){}(); /* { dg-error "called object" } */
++ (struct B){ .i = 2, .j[1] = 1 }(); /* { dg-error "called object" } */
++}