summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/c-pretty-print.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr35742.c13
4 files changed, 26 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 54042483034..dd81dbc178d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/35742
+ * c-pretty-print.c (pp_c_expression): Handle GOTO_EXPR like
+ BIND_EXPR.
+
2009-01-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (last_address): Change to unsigned.
diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c
index 8676205052b..ebfb8851ccf 100644
--- a/gcc/c-pretty-print.c
+++ b/gcc/c-pretty-print.c
@@ -1,5 +1,5 @@
/* Subroutines common to both C and C++ pretty-printers.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
@@ -2104,6 +2104,7 @@ pp_c_expression (c_pretty_printer *pp, tree e)
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, "({...})");
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a86c18caac4..b5976166225 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/35742
+ * gcc.dg/pr35742.c: New test.
+
2009-01-09 John F. Carr <jfc@mit.edu>
PR c++/37877
diff --git a/gcc/testsuite/gcc.dg/pr35742.c b/gcc/testsuite/gcc.dg/pr35742.c
new file mode 100644
index 00000000000..60947279209
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr35742.c
@@ -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" } */
+}