]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: [multiple changes]
authorRichard Guenther <rguenther@suse.de>
Tue, 20 Apr 2010 13:51:24 +0000 (13:51 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 20 Apr 2010 13:51:24 +0000 (13:51 +0000)
2010-04-20  Richard Guenther  <rguenther@suse.de>

Backport from mainline
2008-12-08  Jakub Jelinek  <jakub@redhat.com>
PR c/35443
* c-pretty-print.c (pp_c_expression): Handle BIND_EXPR.

* gcc.dg/pr35443.c: New test.

2009-01-09  Jakub Jelinek  <jakub@redhat.com>

PR c/35742
* c-pretty-print.c (pp_c_expression): Handle GOTO_EXPR like
BIND_EXPR.

* gcc.dg/pr35742.c: New test.

From-SVN: r158557

gcc/ChangeLog
gcc/c-pretty-print.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr35443.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr35742.c [new file with mode: 0644]

index 794475166e072f128fd7fa2c04e2f1aeb705c675..d99458a3fc5ae7829fb80cb7662b533babcd8eb4 100644 (file)
@@ -1,3 +1,16 @@
+2010-04-20  Richard Guenther  <rguenther@suse.de>
+
+       Backport from mainline
+       2008-12-08  Jakub Jelinek  <jakub@redhat.com>
+       PR c/35443
+       * c-pretty-print.c (pp_c_expression): Handle BIND_EXPR.
+
+       2009-01-09  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/35742
+       * c-pretty-print.c (pp_c_expression): Handle GOTO_EXPR like
+       BIND_EXPR.
+
 2010-04-20  Richard Guenther  <rguenther@suse.de>
 
        PR rtl-optimization/43438
index 39044a3cebd975aeec12e7727d8843b6876f6925..d76bd7cebf21f136d388005c0b856342935d97d3 100644 (file)
@@ -2031,6 +2031,13 @@ pp_c_expression (c_pretty_printer *pp, tree e)
       pp_postfix_expression (pp, TREE_OPERAND (e, 1));
       break;
 
+    case BIND_EXPR:
+    case GOTO_EXPR:
+      /* We don't yet have a way of dumping statements in a
+         human-readable format.  */
+      pp_string (pp, "({...})");
+      break;
+
     default:
       pp_unsupported_tree (pp, e);
       break;
index 45553b688a1ab60d1119d07c379573d11c77a058..c9842fb3aea79996fe5ed5dfde60c3439094de35 100644 (file)
@@ -1,3 +1,15 @@
+2010-04-20  Richard Guenther  <rguenther@suse.de>
+
+       Backport from mainline
+       2008-12-08  Jakub Jelinek  <jakub@redhat.com>
+       PR c/35443
+       * gcc.dg/pr35443.c: New test.
+
+       2009-01-09  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/35742
+       * gcc.dg/pr35742.c: New test.
+
 2010-04-20  Richard Guenther  <rguenther@suse.de>
 
        PR rtl-optimization/43438
diff --git a/gcc/testsuite/gcc.dg/pr35443.c b/gcc/testsuite/gcc.dg/pr35443.c
new file mode 100644 (file)
index 0000000..5dfc299
--- /dev/null
@@ -0,0 +1,9 @@
+/* PR c/35443 */
+/* { dg-options "" } */
+/* { dg-bogus "not supported by" "" { target *-*-* } 0 } */
+
+void
+foo ()
+{
+  ({ int i; i; })();   /* { dg-error "is not a function" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr35742.c b/gcc/testsuite/gcc.dg/pr35742.c
new file mode 100644 (file)
index 0000000..6094727
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR c/35742 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+/* { dg-bogus "not supported by" "" { target *-*-* } 0 } */
+
+void
+foo ()
+{
+  for (;;)
+    ({break;})();      /* { dg-error "is not a function" } */
+  for (;;)
+    ({continue;})();   /* { dg-error "is not a function" } */
+}