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: Bootstrap failure due to your fix for PR 26122


Volker Reichelt wrote:
> Mark,
> 
> your patch for PR26122 causes a bootstrap failure on mainline
> (x86_64-unknown-linux-gnu) when compiling cp/parser.c:
> 
> cc1: warnings being treated as errors
> ../../gcc/gcc/cp/parser.c: In function 'cp_parser_init_declarator':
> ../../gcc/gcc/cp/parser.c:10895: warning: 'is_parenthesized_init' may be used uninitialized in this function
> make[3]: *** [cp/parser.o] Error 1
> 
> Well, you didn't really break it, but your change probably exposed the
> latent problem.

I've now applied this patch to 4.1 and mainline, after testing on
x86_64-unknown-linux-gnu.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
2006-04-12  Mark Mitchell  <mark@codesourcery.com>

	* parser.c (cp_parser_init_declarator): Initialize local variables
	aggressively.

Index: parser.c
===================================================================
--- parser.c	(revision 112869)
+++ parser.c	(working copy)
@@ -11093,6 +11093,9 @@ cp_parser_init_declarator (cp_parser* pa
     }
 
   /* Parse the initializer.  */
+  initializer = NULL_TREE;
+  is_parenthesized_init = false;
+  is_non_constant_init = true;
   if (is_initialized)
     {
       if (declarator->kind == cdk_function
@@ -11104,12 +11107,6 @@ cp_parser_init_declarator (cp_parser* pa
 					     &is_parenthesized_init,
 					     &is_non_constant_init);
     }
-  else
-    {
-      initializer = NULL_TREE;
-      is_parenthesized_init = false;
-      is_non_constant_init = true;
-    }
 
   /* The old parser allows attributes to appear after a parenthesized
      initializer.  Mark Mitchell proposed removing this functionality

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