This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [4.1 PATCH] Backport C++ PR28261 fix to fix PR c++/29535


On Fri, Jan 05, 2007 at 01:46:43PM +0100, Richard Guenther wrote:
> >In http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00877.html
> >Mark said "I will apply to the 4.1 branch when testing completes."
> >The patch applies cleanly and, more importantly, fixes a P1 regression
> >on 4.1 branch.
> >Bootstrapped/regtested so far on {i386,x86_64,s390{,x}}-linux, ok for 4.1?
> >Is the new testcase ok for 4.2/trunk?
> 
> This caused PR30382 on the branch.  Possibly another patch needs
> backporting.

Oops, sorry, turns out I have bootstrapped/regtested this just on
redhat/gcc-4_1-branch, not vanilla gcc-4_1-branch (and that has Jason's
visibility attribute fixes in it).

Here is what I have regtested on gcc-4_1-branch, ok for 4.1?

2007-01-05  Jakub Jelinek  <jakub@redhat.com>

	PR c++/30382
	Backported from mainline:
	2006-06-29  Jason Merrill  <jason@redhat.com>
	* parser.c (cp_parser_enum_specifier): Return early if
	type is error_mark_node.

--- gcc/cp/parser.c.jj	2007-01-05 13:56:13.000000000 +0100
+++ gcc/cp/parser.c	2007-01-05 15:21:25.000000000 +0100
@@ -10314,6 +10314,12 @@ cp_parser_enum_specifier (cp_parser* par
   /* Consume the opening brace.  */
   cp_lexer_consume_token (parser->lexer);
 
+  if (type == error_mark_node)
+    {
+      cp_parser_skip_to_end_of_block_or_statement (parser);
+      return error_mark_node;
+    }
+
   /* If the next token is not '}', then there are some enumerators.  */
   if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_BRACE))
     cp_parser_enumerator_list (parser, type);


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]