summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2002-12-30 18:21:49 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2002-12-30 18:21:49 +0000
commit2bd7894764c834b0a5420126754572b1fc7a9fab (patch)
treea7e2c0278fb3c367bff74a5ef818b20bbada47d5
parent5d1e9c9840ddc66ff9be1f58d180e503925c303b (diff)
downloadgcc-2bd7894764c834b0a5420126754572b1fc7a9fab.tar.gz
* parser.c (cp_parser_parameter_declaration_clause): Treat system
header as extern "C" if NO_IMPLICIT_EXTERN_C undefined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60639 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parser.c10
2 files changed, 14 insertions, 1 deletions
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 <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:
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