Joern Rennecke <joern.renne...@embecosm.com> 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 -- a...@linux.intel.com -- Speaking for myself only