aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-08-24 22:13:54 +0000
committerRichard Stallman <rms@gnu.org>1992-08-24 22:13:54 +0000
commit7d2d49af126b23df12a81d029c891dc1343dc8e6 (patch)
tree1ab1f82182ebdfb5bf9d297c2bdef45200b7cd89 /gcc
parent5874448344f74d0033faaadc5d009bcd3d2726bb (diff)
downloadgcc-7d2d49af126b23df12a81d029c891dc1343dc8e6.zip
gcc-7d2d49af126b23df12a81d029c891dc1343dc8e6.tar.gz
gcc-7d2d49af126b23df12a81d029c891dc1343dc8e6.tar.bz2
(build_unary_op): For ADDR_EXPR, just set TREE_CONSTANT
if staticp, but don't clear TREE_CONSTANT. From-SVN: r1939
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-typeck.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 9f23a9a..3b0f809 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -3166,8 +3166,9 @@ build_unary_op (code, xarg, noconvert)
addr = build1 (code, argtype, arg);
/* Address of a static or external variable or
- function counts as a constant */
- TREE_CONSTANT (addr) = staticp (arg);
+ function counts as a constant. */
+ if (staticp (arg))
+ TREE_CONSTANT (addr) = 1;
return addr;
}
}