OSDN Git Service

(build_unary_op): For ADDR_EXPR, just set TREE_CONSTANT
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 24 Aug 1992 22:13:54 +0000 (22:13 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 24 Aug 1992 22:13:54 +0000 (22:13 +0000)
if staticp, but don't clear TREE_CONSTANT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1939 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-typeck.c

index 9f23a9a..3b0f809 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;
       }
     }