From f10af3b97c4c523050849d10f156fa82e2bc10aa Mon Sep 17 00:00:00 2001 From: jakub Date: Mon, 8 Dec 2008 18:04:58 +0000 Subject: [PATCH] PR c/35443 * c-pretty-print.c (pp_c_expression): Handle BIND_EXPR. * gcc.dg/pr35443.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142559 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 3 +++ gcc/c-pretty-print.c | 6 ++++++ gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.dg/pr35443.c | 9 +++++++++ 4 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr35443.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a35cf4..b063d4a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2008-12-08 Jakub Jelinek + PR c/35443 + * c-pretty-print.c (pp_c_expression): Handle BIND_EXPR. + PR c/35442 * c-pretty-print.c (pp_c_cast_expression, pp_c_expression): Handle VIEW_CONVERT_EXPR the same as CASE_CONVERT. diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c index cc36679..8676205 100644 --- a/gcc/c-pretty-print.c +++ b/gcc/c-pretty-print.c @@ -2103,6 +2103,12 @@ pp_c_expression (c_pretty_printer *pp, tree e) pp_postfix_expression (pp, TREE_OPERAND (e, 1)); break; + case BIND_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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 84fd621..d24f579 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2008-12-08 Jakub Jelinek + PR c/35443 + * gcc.dg/pr35443.c: New test. + PR c/35442 * gcc.dg/pr35442.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr35443.c b/gcc/testsuite/gcc.dg/pr35443.c new file mode 100644 index 0000000..5dfc299 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr35443.c @@ -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" } */ +} -- 2.7.4