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]

[patch] fix bootstrap cp/parser.c


Hi all,

the attached patch fixes bootstrap. Obvious enough?

Andreas

2008-01-15 Andreas Tobler <a.tobler@schweiz.org>

	* parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
	declaration and code.
	Update copyright.

Index: parser.c
===================================================================
--- parser.c	(revision 131552)
+++ parser.c	(working copy)
@@ -1,6 +1,6 @@
 /* C++ Parser.
    Copyright (C) 2000, 2001, 2002, 2003, 2004,
-   2005, 2007  Free Software Foundation, Inc.
+   2005, 2007, 2008  Free Software Foundation, Inc.
    Written by Mark Mitchell <mark@codesourcery.com>.

    This file is part of GCC.
@@ -9318,6 +9318,7 @@
 {
   cp_token *token;
   cp_parameter_declarator *parameter_declarator;
+  cp_declarator *id_declarator;
   tree parm;

   /* Assume it is a type parameter or a template parameter.  */
@@ -9408,7 +9409,7 @@
 	  cp_lexer_consume_token (parser->lexer);

 	  /* Find the name of the parameter pack.  */
-	  cp_declarator *id_declarator = parameter_declarator->declarator;
+	  id_declarator = parameter_declarator->declarator;
 	  while (id_declarator && id_declarator->kind != cdk_id)
 	    id_declarator = id_declarator->declarator;


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