From 7d2d49af126b23df12a81d029c891dc1343dc8e6 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Mon, 24 Aug 1992 22:13:54 +0000 Subject: [PATCH] (build_unary_op): For ADDR_EXPR, just set TREE_CONSTANT if staticp, but don't clear TREE_CONSTANT. From-SVN: r1939 --- gcc/c-typeck.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 9f23a9a0142..3b0f809e390 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; } } -- 2.30.2