cppexp.c (num_equality_op): Use a temporary variable to work around gcc 3.0.4 bug.
authorJason Merrill <jason@redhat.com>
Fri, 7 Jun 2002 13:29:17 +0000 (09:29 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 7 Jun 2002 13:29:17 +0000 (09:29 -0400)
        * cppexp.c (num_equality_op): Use a temporary variable to work
        around gcc 3.0.4 bug.

From-SVN: r54339

gcc/ChangeLog
gcc/cppexp.c

index 10d1df8aa1e2d438fc3e65f31d93eb2d880d0a0d..835ae073e7e8d61de7f363559fd4c6820e2637f5 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-07  Jason Merrill  <jason@redhat.com>
+
+       * cppexp.c (num_equality_op): Use a temporary variable to work
+       around gcc 3.0.4 bug.
+
 2002-06-07  Gabriel Dos Reis  <gdr@codesourcery.com>
 
        * diagnostic.c (diagnostic_build_prefix): Tidy.
index e5f464eaa0008177f46a8c8b3a2b2bb39cbf04f6..4fc833c23e4e4d3e690a126e090e6728fedaaa96 100644 (file)
@@ -1128,9 +1128,11 @@ num_equality_op (pfile, lhs, rhs, op)
      cpp_num lhs, rhs;
      enum cpp_ttype op;
 {
-  lhs.low = num_eq (lhs, rhs);
+  /* Work around a 3.0.4 bug; see PR 6950.  */
+  bool eq = num_eq (lhs, rhs);
   if (op == CPP_NOT_EQ)
-    lhs.low = !lhs.low;
+    eq = !eq;
+  lhs.low = eq;
   lhs.high = 0;
   lhs.overflow = false;
   lhs.unsignedp = false;