re PR c++/28250 (ICE with invalid catch)
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Mon, 17 Jul 2006 04:42:24 +0000 (04:42 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Mon, 17 Jul 2006 04:42:24 +0000 (04:42 +0000)
commit2a50edcd0f5cca974fe82b27a1b109618afa1a05
tree215431855ee45679fe617055909a44fafef8e7f9
parent23be7a669151a833b7ab99a657082ce72a9ae3fd
re PR c++/28250 (ICE with invalid catch)

PR c++/28250
* name-lookup.c (pushdecl_maybe_friend): Return early on
error_mark_node.
* except.c (expand_start_catch_block): Use error_mark_node instead
of NULL_TREE for invalid decls.
* parser.c (cp_parser_exception_declaration): Return error_mark_node
on invalid catch parameter. Simplify.

* g++.dg/eh/catch1.C: New test.
* g++.dg/eh/catch2.C: New test.

From-SVN: r115516
gcc/cp/ChangeLog
gcc/cp/except.c
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/eh/catch1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/eh/catch2.C [new file with mode: 0644]