From 621b5ed6130e8ec76c8c2b8c2d2411a2d57e7f60 Mon Sep 17 00:00:00 2001
From: Richard Guenther <rguenther@suse.de>
Date: Sat, 3 May 2008 15:28:57 +0000
Subject: [PATCH] re PR middle-end/34973 (Wno-strict-aliasing is not working)

2008-05-03  Richard Guenther  <rguenther@suse.de>

	PR middle-end/34973
	* opts.c (set_Wstrict_aliasing): Handle the turn-off case.

From-SVN: r134903
---
 gcc/ChangeLog | 5 +++++
 gcc/opts.c    | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 02055e57e0d6..5665dc983f63 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-03  Richard Guenther  <rguenther@suse.de>
+
+	PR middle-end/34973
+	* opts.c (set_Wstrict_aliasing): Handle the turn-off case.
+
 2008-05-02  David S. Miller  <davem@davemloft.net>
 
 	* config.gcc (need_64bit_hwint): Document libcpp dependency.
diff --git a/gcc/opts.c b/gcc/opts.c
index b87bc562e5a0..a5931f45a99f 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1982,6 +1982,8 @@ set_Wstrict_aliasing (int onoff)
   gcc_assert (onoff == 0 || onoff == 1);
   if (onoff != 0)
     warn_strict_aliasing = 3;
+  else
+    warn_strict_aliasing = 0;
 }
 
 /* The following routines are useful in setting all the flags that
-- 
GitLab