]> gcc.gnu.org Git - gcc.git/commitdiff
(build_unary_op): For ADDR_EXPR, just set TREE_CONSTANT
authorRichard Stallman <rms@gnu.org>
Mon, 24 Aug 1992 22:13:54 +0000 (22:13 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 24 Aug 1992 22:13:54 +0000 (22:13 +0000)
if staticp, but don't clear TREE_CONSTANT.

From-SVN: r1939

gcc/c-typeck.c

index 9f23a9a0142322ed42c93d04951116fe591a9a4d..3b0f809e390da2ec91091cfc6a7b939a553fe7b2 100644 (file)
@@ -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;
       }
     }
This page took 0.073392 seconds and 5 git commands to generate.