[LLVMdev] LLVMdev Digest, Vol 76, Issue 43

Dale Johannesen dalej at apple.com
Mon Oct 25 17:33:45 PDT 2010


On Oct 25, 2010, at 5:13 PMPDT, Kenneth Boyd wrote:
> On 10/25/2010 6:31 PM, Peter Lawrence wrote:
>> 
>> Your objection is like saying that it isn't kosher to ignore the
>> "register" keyword, because
>> "I know what I am doing and you don't.....".
> What isn't kosher, is making side effects disappear from a C program.
> 
> I'm not going to bother quoting C99 5.1.2.3/2,3 verbatim, as we already 
> have Word of God (Duncan Sands) that the C99 (and C90) standard's 
> requirements on volatile are intentionally being violated.

There is no inherent reason llvm "volatile" has to have to the same semantics as C "volatile" just because they're spelled the same.  For another case, see sqrt.

That said, I'm strongly on the side of those who think removing volatile loads is a bad idea.  But the last time this came up, I wasn't able to construct a case where this resulted in externally visible incorrect behavior.  Can anyone?






More information about the llvm-dev mailing list