> On Apr 14, 2022, at 11:49 AM, Stuart Henderson <[email protected]> wrote:
>
> My thinking is that, if the code has behaviour which is considered
> undefined by the C standard assumed by the compiler, no level of
> optimization is safe. Maybe now you get lucky and -O works (on whichever
> architecture you've tested) but I don't think it's reasonable to assume
> that this is the case everywhere, or will be the case following compiler
> updates.
I haven't looked very deeply at epic but if the note is referring to strict
aliasing then I would follow the advice about sticking to -O.
John Regehr wrote up a nice piece on this a few years ago:
https://blog.regehr.org/archives/1307
>
> (Of course on many OpenBSD architectures the relevant compiler is not
> GCC anyway).
>