logoalt Hacker News

wbltoday at 3:04 PM1 replyview on HN

The compiler declares them UB because very useful transformations would change the semantics of races. Races are ok with specially marked variables!


Replies

eqvinoxtoday at 3:11 PM

That's not the point of my argument. The compiler declaring things UB needs to be addressed by telling the compiler to not be silly, not by forcing every single access to be on the byte level. And especially not if those are SeqCst atomics.