aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 70bf5ef..9474250 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