(pedantic_non_lvalue): Check pedantic_lvalues instead of pedantic.
authorJason Merrill <merrill@gnu.org>
Tue, 17 Jan 1995 21:43:40 +0000 (21:43 +0000)
committerJason Merrill <merrill@gnu.org>
Tue, 17 Jan 1995 21:43:40 +0000 (21:43 +0000)
From-SVN: r8765

gcc/fold-const.c

index 9d40401ffa699aa415ac36adab8cc431c56e2c63..c17c1d70a5e4c7df59bcfa18c8f2c6c998553576 100644 (file)
@@ -1562,6 +1562,11 @@ non_lvalue (x)
   return result;
 }
 
+/* Nonzero means lvalues are limited to those valid in pedantic ANSI C.
+   Zero means allow extended lvalues.  */
+
+int pedantic_lvalues;
+
 /* When pedantic, return an expr equal to X but certainly not valid as a
    pedantic lvalue.  Otherwise, return X.  */
 
@@ -1569,7 +1574,7 @@ tree
 pedantic_non_lvalue (x)
      tree x;
 {
-  if (pedantic)
+  if (pedantic_lvalues)
     return non_lvalue (x);
   else
     return x;