misc.c (gnat_handle_option): Remove special logic for Wuninitialized without -O.
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Sun, 16 May 2010 10:30:39 +0000 (10:30 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Sun, 16 May 2010 10:30:39 +0000 (10:30 +0000)
2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>

ada/
* gcc-interface/misc.c (gnat_handle_option): Remove special logic
for Wuninitialized without -O.
fortran/
* options.c (set_Wall): Remove special logic for Wuninitialized
without -O.

From-SVN: r159454

gcc/ada/ChangeLog
gcc/ada/gcc-interface/misc.c
gcc/fortran/ChangeLog
gcc/fortran/options.c

index b70056b77a84a0bf36e0af946ae92ec01939df40..20ca27a06461f4f25567c662012648299f425c73 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
+
+       * gcc-interface/misc.c (gnat_handle_option): Remove special logic
+       for Wuninitialized without -O.
+       
 2010-05-16  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/gigi.h (enum standard_datatypes): Add new value
index c8193f37b8aed1364dbed51ea2b415a3696ec3a9..0f85393d9568fb8600a4bc256d1c876eaa570523 100644 (file)
@@ -209,12 +209,7 @@ gnat_handle_option (size_t scode, const char *arg, int value,
 
     case OPT_Wall:
       warn_unused = value;
-
-      /* We save the value of warn_uninitialized, since if they put
-        -Wuninitialized on the command line, we need to generate a
-        warning about not using it without also specifying -O.  */
-      if (warn_uninitialized != 1)
-       warn_uninitialized = (value ? 2 : 0);
+      warn_uninitialized = value;
       break;
 
       /* These are used in the GCC Makefile.  */
index 2b2bc9bfb576dcb243682f930117ca45f293c670..a8879acb460971ef37fb919d1ac267ef63ca38ef 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
+
+       * options.c (set_Wall): Remove special logic for Wuninitialized
+       without -O.
+
 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/44154
index 28c91147534864db7aaf7a94a8f6e9d40880dda1..6a5a3db6f3bd52b80808489999d52dfbf9eecb30 100644 (file)
@@ -413,14 +413,7 @@ set_Wall (int setting)
   warn_unused = setting;
   warn_return_type = setting;
   warn_switch = setting;
-
-  /* We save the value of warn_uninitialized, since if they put
-     -Wuninitialized on the command line, we need to generate a
-     warning about not using it without also specifying -O.  */
-  if (setting == 0)
-    warn_uninitialized = 0;
-  else if (warn_uninitialized != 1)
-    warn_uninitialized = 2;
+  warn_uninitialized = setting;
 }