diff options
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/error.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/error32.C | 8 |
4 files changed, 21 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7206639..df07da5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2009-03-06 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/33492 + * error.c (dump_expr): Don't try to print THROW_EXPRs in full. + 2009-03-06 Alexandre Oliva <aoliva@redhat.com> * decl.c (record_builtin_java_type): Use canonicalized integer diff --git a/gcc/cp/error.c b/gcc/cp/error.c index e2cb8bf..5eb8f28 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1508,8 +1508,9 @@ dump_expr (tree t, int flags) break; case THROW_EXPR: - pp_cxx_identifier (cxx_pp, "throw"); - dump_expr (TREE_OPERAND (t, 0), flags); + /* While waiting for caret diagnostics, avoid printing + __cxa_allocate_exception, __cxa_throw, and the like. */ + pp_cxx_identifier (cxx_pp, "<throw-expression>"); break; case PTRMEM_CST: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c349894..891bdb7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-03-06 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/33492 + * g++.dg/other/error32.C: New. + 2009-03-06 Jakub Jelinek <jakub@redhat.com> PR middle-end/39360 diff --git a/gcc/testsuite/g++.dg/other/error32.C b/gcc/testsuite/g++.dg/other/error32.C new file mode 100644 index 0000000..35c64c4 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/error32.C @@ -0,0 +1,8 @@ +// PR c++/33492 +// { dg-options "" } + +void foo() +{ + if (throw 0) // { dg-error "could not convert .\\<throw-expression\\>. to .bool." } + ; +} |