Commit c838d82f by Mark Mitchell Committed by Mark Mitchell

* parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.

From-SVN: r60644
parent afd9b9dd
2002-12-30 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2002-12-30 David Edelsohn <edelsohn@gnu.org> 2002-12-30 David Edelsohn <edelsohn@gnu.org>
* parser.c (cp_parser_parameter_declaration_clause): Treat system * parser.c (cp_parser_parameter_declaration_clause): Treat system
......
...@@ -6456,6 +6456,20 @@ cp_parser_declaration_seq_opt (parser) ...@@ -6456,6 +6456,20 @@ cp_parser_declaration_seq_opt (parser)
continue; continue;
} }
/* The C lexer modifies PENDING_LANG_CHANGE when it wants the
parser to enter or exit implict `extern "C"' blocks. */
while (pending_lang_change > 0)
{
push_lang_context (lang_name_c);
--pending_lang_change;
}
while (pending_lang_change < 0)
{
pop_lang_context ();
++pending_lang_change;
}
/* Parse the declaration itself. */
cp_parser_declaration (parser); cp_parser_declaration (parser);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment