aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1995-01-17 21:43:40 +0000
committerJason Merrill <merrill@gnu.org>1995-01-17 21:43:40 +0000
commite9866da310c2a1d3aefe79367553d91de16802e2 (patch)
tree3ec50c49502d5dcabc7257522a1bae299b219f7c /gcc/fold-const.c
parent19cad249411aa4dc3cb166e869bad686c1fb5923 (diff)
downloadgcc-e9866da310c2a1d3aefe79367553d91de16802e2.zip
gcc-e9866da310c2a1d3aefe79367553d91de16802e2.tar.gz
gcc-e9866da310c2a1d3aefe79367553d91de16802e2.tar.bz2
(pedantic_non_lvalue): Check pedantic_lvalues instead of pedantic.
From-SVN: r8765
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 9d40401..c17c1d7 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -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;