Patchwork Fix initialization of warn_maybe_uninitialized

login
register
mail settings
Submitter Michael Matz
Date April 28, 2011, 3:42 p.m.
Message ID <Pine.LNX.4.64.1104281733440.1989@wotan.suse.de>
Download mbox | patch
Permalink /patch/93258/
State New
Headers show

Comments

Michael Matz - April 28, 2011, 3:42 p.m.
Hi,

since the split of warn_uninitialized to warn_maybe_uninitialized the 
fortran and Ada frontends have changed behaviours (causing uninit_func.adb 
to fail).  I've left out the Java frontend because it also didn't set 
warn_uninitialized with -Wall before, and go because it doesn't do 
anything special with -Wall at all.

I'll apply this as obvious once regstrapping on x86_64-linux finishes 
without regressions.


Ciao,
Michael.

ada/
	* gcc-interface/misc.c (gnat_handle_option): Set
	warn_maybe_uninitialized.

fortran/
	* options.c (options.c): Set warn_maybe_uninitialized.

Patch

Index: ada/gcc-interface/misc.c
===================================================================
--- ada/gcc-interface/misc.c	(revision 173070)
+++ ada/gcc-interface/misc.c	(working copy)
@@ -112,6 +112,7 @@  gnat_handle_option (size_t scode, const
     case OPT_Wall:
       warn_unused = value;
       warn_uninitialized = value;
+      warn_maybe_uninitialized = value;
       break;
 
     case OPT_Wmissing_prototypes:
Index: fortran/options.c
===================================================================
--- fortran/options.c	(revision 173070)
+++ fortran/options.c	(working copy)
@@ -461,6 +461,7 @@  set_Wall (int setting)
   warn_return_type = setting;
   warn_switch = setting;
   warn_uninitialized = setting;
+  warn_maybe_uninitialized = setting;
 }