------- Comment #5 from mueller at gcc dot gnu dot org  2007-12-08 12:55 -------
this seems to be readding the warning with relatively low false positive rate
(e.g. didn't find a false one yet). 

--- cp/typeck.c (revision 130658)
+++ cp/typeck.c (working copy)
@@ -5269,11 +5268,16 @@ build_reinterpret_cast_1 (tree type, tre

       expr = build_unary_op (ADDR_EXPR, expr, 0);
       if (expr != error_mark_node)
-       expr = build_reinterpret_cast_1
-         (build_pointer_type (TREE_TYPE (type)), expr, c_cast_p,
-          valid_p);
-      if (expr != error_mark_node)
-       expr = build_indirect_ref (expr, 0);
+        {
+         if (strict_aliasing_warning (intype, type, expr))
+               TREE_NO_WARNING (expr) = 1;
+
+         expr = build_reinterpret_cast_1
+           (build_pointer_type (TREE_TYPE (type)), expr, c_cast_p,
+            valid_p);
+          if (expr != error_mark_node)
+           expr = build_indirect_ref (expr, 0);
+        }
       return expr;
     }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34386

Reply via email to