[Bug c++/29886] [4.0/4.1/4.2/4.3 regression] Cast misinterpreted as variable declaration

mmitchel at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Nov 27 03:39:00 GMT 2006



------- Comment #2 from mmitchel at gcc dot gnu dot org  2006-11-27 03:39 -------
Subject: Bug 29886

Author: mmitchel
Date: Mon Nov 27 03:38:57 2006
New Revision: 119242

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119242
Log:
        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.

Added:
    trunk/gcc/testsuite/g++.dg/expr/cast8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29886



More information about the Gcc-bugs mailing list