News for hackers. Stuff that matters.
Re:Everything in C is undefined behavior by mananaysiempre on Wednesday May 20, 2026 @07:55AM (#48206280)
> Your first paragraph makes it sound as if the compiler will actually generate two reads of the value of some register, which might lead to unexpected effects at runtime for certain special registers.

I don’t see how. I was trying to explain why it’s reasonable for a volatile read to be a side effect, after which the C rule on unsequenced side effects applies, yielding UB as you say.

There are no comments on this comment yet.