Hi,
This bug is a slight variant of the testcase in PR27961 to which I
posted a patch to fix here:
http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00867.html, the patch
fixes this bug by adding in additional error checking to
cp_parser_parenthesized_expression_list and
cp_parser_init_declarator, both of which will propagate the error back
up the calling functions.
Following it's the modified testcase's revival as PR30156 I've
bootstrapped and regression tested the patch against current mainline
with no regressions. Ok to apply?
Cheers,
Lee.
:ADDPATCH c++:
cp/
2006-12-12 Lee Millward <lee.millward@codesourcery.com>
PR c++/30156
* parser.c (cp_parser_parenthesized_expression_list): Detect
and propagate invalid expressions as error_mark_node sooner.
(cp_parser_init_declarator): Likewise for initializations.
testsuite/
2006-10-17 Lee Millward <lee.millward@codesourcery.com>
PR c++/30156
* g++.dg/template/crash60: Add new test for functions
returning a non-void value.