parser.c (cp_parser_parameter_declaration_clause): Treat system header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.

* parser.c (cp_parser_parameter_declaration_clause): Treat system
        header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.

From-SVN: r60639
This commit is contained in:
David Edelsohn 2002-12-30 18:21:49 +00:00 committed by David Edelsohn
parent b599b13591
commit c73aecdfc0
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-12-30 David Edelsohn <edelsohn@gnu.org>
* parser.c (cp_parser_parameter_declaration_clause): Treat system
header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
* config-lang.in, Make-lang.in, operators.def, cp-tree.def:

View File

@ -10558,7 +10558,15 @@ cp_parser_parameter_declaration_clause (parser)
}
else if (token->type == CPP_CLOSE_PAREN)
/* There are no parameters. */
return void_list_node;
{
#ifndef NO_IMPLICIT_EXTERN_C
if (in_system_header && current_class_type == NULL
&& current_lang_name == lang_name_c)
return NULL_TREE;
else
#endif
return void_list_node;
}
/* Check for `(void)', too, which is a special case. */
else if (token->keyword == RID_VOID
&& (cp_lexer_peek_nth_token (parser->lexer, 2)->type