From c73aecdfc05847ecdea447746bb5204348924e07 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Mon, 30 Dec 2002 18:21:49 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 75ea2308390..ccc942e32f7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2002-12-30 David Edelsohn + + * parser.c (cp_parser_parameter_declaration_clause): Treat system + header as extern "C" if NO_IMPLICIT_EXTERN_C undefined. + 2002-12-30 Nathanael Nerode * config-lang.in, Make-lang.in, operators.def, cp-tree.def: diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 70bf5eff4ba..94742504145 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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