diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-09-07 17:16:23 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-09-07 17:16:23 +0000 |
commit | 3023956508806f919e89086cca3e8f73b2c7c323 (patch) | |
tree | 5273669debafa01ea7678f0e045b4e2f587190e3 | |
parent | e39438c55d8d22f9ede589d3fc19bacd639be58b (diff) | |
download | gcc-3023956508806f919e89086cca3e8f73b2c7c323.zip gcc-3023956508806f919e89086cca3e8f73b2c7c323.tar.gz gcc-3023956508806f919e89086cca3e8f73b2c7c323.tar.bz2 |
re PR c++/50309 ([C++0x] ICE: tree check: expected tree_list, have error_mark in comp_except_specs, at cp/typeck.c:1014 on empty noexcept)
/cp
2011-09-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50309
* decl.c (grokdeclarator): Check u.function.exception_specification
for error_mark_node.
/testsuite
2011-09-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50309
* g++.dg/cpp0x/noexcept14.C: New.
From-SVN: r178654
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/noexcept14.C | 4 |
4 files changed, 21 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1c6c5a1..9810d7d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2011-09-07 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/50309 + * decl.c (grokdeclarator): Check u.function.exception_specification + for error_mark_node. + 2011-09-07 Jason Merrill <jason@redhat.com> PR c++/50298 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index eed4535..e30fe18 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9049,6 +9049,10 @@ grokdeclarator (const cp_declarator *declarator, virt_specifiers = declarator->u.function.virt_specifiers; /* Pick up the exception specifications. */ raises = declarator->u.function.exception_specification; + /* If the exception-specification is ill-formed, let's pretend + there wasn't one. */ + if (raises == error_mark_node) + raises = NULL_TREE; /* Say it's a definition only for the CALL_EXPR closest to the identifier. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f3d6ddb..c0bc7cc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-09-07 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/50309 + * g++.dg/cpp0x/noexcept14.C: New. + 2011-09-07 Jason Merrill <jason@redhat.com> * g++.dg/cpp0x/constexpr-ref3.C: New. @@ -5,9 +10,9 @@ * g++.dg/cpp0x/sfinae11.C: Check for explanatory diagnostic. 2011-09-07 Georg-Johann Lay <avr@gjlay.de> - + * gcc.dg/section1.c: Don't xfail for avr. - + 2011-09-07 Georg-Johann Lay <avr@gjlay.de> PR tree-optimization/50322 diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept14.C b/gcc/testsuite/g++.dg/cpp0x/noexcept14.C new file mode 100644 index 0000000..eba2c40 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept14.C @@ -0,0 +1,4 @@ +// PR c++/50309 +// { dg-options -std=c++0x } + +void foo () noexcept () { } // { dg-error "expected" } |