This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: AIX bootstrap failure (C++ PATCH: New parser)
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 28 Dec 2002 19:32:40 -0500
- Subject: Re: AIX bootstrap failure (C++ PATCH: New parser)
- References: <200212282327.SAA27252@makai.watson.ibm.com>
Is something like the following patch correct?
David
* parser.c (cp_parser_parameter_declaration_clause): Treat system
header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
Index: parser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v
retrieving revision 1.3
diff -c -p -r1.3 parser.c
*** parser.c 28 Dec 2002 14:38:38 -0000 1.3
--- parser.c 29 Dec 2002 00:28:08 -0000
*************** cp_parser_parameter_declaration_clause (
*** 10558,10564 ****
}
else if (token->type == CPP_CLOSE_PAREN)
/* There are no parameters. */
! 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
--- 10558,10572 ----
}
else if (token->type == CPP_CLOSE_PAREN)
/* There are no parameters. */
! {
! #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