re PR c++/29886 (Cast misinterpreted as variable declaration)
authorMark Mitchell <mark@codesourcery.com>
Mon, 27 Nov 2006 03:38:57 +0000 (03:38 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 27 Nov 2006 03:38:57 +0000 (03:38 +0000)
commit56c7f9c1d073eb17e95c171e945bfabb322ca5f1
tree8286b3f99f0ffc3955165946f34a9bbf324c1b16
parentf019376cf52c44761f3ad38ef7ea9f0465f30306
re PR c++/29886 (Cast misinterpreted as variable declaration)

PR c++/29886
* parser.c (cp_parser): Add in_function_body.
(cp_parser_new): Initialize it.
(cp_parser_primary_expression): Use parser->in_function_body
instead of at_function_scope_p.
(cp_parser_asm_definition): Likewise.
(cp_parser_direct_declarator): Likewise.
(cp_parser_class_specifier): Clear parser->in_function_body.
(cp_parser_constructor_declarator_p): Use parser->in_function_body
instead of at_function_scope_p.
(cp_parser_function_body_after_declarator): Set
parser->in_function_body.
PR c++/29886
* g++.dg/expr/cast8.C: New test.

From-SVN: r119242
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/cast8.C [new file with mode: 0644]