Joern Rennecke <[email protected]> writes: > > More importantly. addresses that becomes a SYMBOL_REF should be considered > constant. I.e. In particular, the addresses of variables with static storage. > I have a simple patch to recognize these as constants; > do people agree that this is the right thing to do?
if someone writes if (__builtin_constant_p(x) && x == 1) ... and assume the compiler can collapse at compile time then a SYMBOL_REF wouldn't DTRT. I've seen quite a bit such code. So I would prefer to accept only numbers known at compile time already. -Andi -- [email protected] -- Speaking for myself only
