diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2009-03-06 23:52:02 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2009-03-06 23:52:02 +0000 |
commit | d8b4270d0c396bcb055ce42662c76a9db29f3c71 (patch) | |
tree | 9fec518c2e3df411d02d340bef820976f5787fc4 /gcc | |
parent | 65401a0ba393e9f2b971e9069e0335dc26c8a917 (diff) | |
download | gcc-d8b4270d0c396bcb055ce42662c76a9db29f3c71.zip gcc-d8b4270d0c396bcb055ce42662c76a9db29f3c71.tar.gz gcc-d8b4270d0c396bcb055ce42662c76a9db29f3c71.tar.bz2 |
re PR c++/33492 (Broken diagnostic: 'must_not_throw_expr' not supported by dump_expr)
/cp
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.
/testsuite
2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33492
* g++.dg/other/error32.C: New.
From-SVN: r144686
Diffstat (limited to 'gcc')
-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." } + ; +} |