@wolf480pl Despite my insistence that people who want portable assembler should use -O0, compilers can and do generate code assuming a lack of UB even at that optimization level
@saagar@wolf480pl it's sort of impossible not to. Any transformation of code, no matter how simply, has to rely on the idea that the behavior of the code is the same before and after the transformation. And if there is no known behavior (because UB) you're outta luck.
@wolf480pl@saagar there's some low hanging fruit in C that's easy enough to define, but a lot of UB in C is very hard to define, at least on normal hardware.
(and you're probably not defining things differently at O0 and O3, I think?)
@lonjil@saagar no I actually mean define them only at O0 :P Define them to do something dumb and potentially dangerous but predictable. Bonus points if it matches most people's idea of a "a high-level assembly"