[Bug c/104884] functions miss their 'ret' instruction (and fall through) in certain cases with '-O3' under x86-64

zamfofex at twdb dot moe gcc-bugzilla@gcc.gnu.org
Fri Mar 11 18:35:05 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104884

--- Comment #4 from zamfofex at twdb dot moe ---
I would have expected that compilers would at least try to avoid incorporating
behaving in a way that is deemed dangerous, even when a program causes
undefined behavior.

But to be honest, I understand that it’s difficult to determine what is
“dangerous” concretely in some cases, and also that it’s not the compiler’s job
to fix buggy code, so the current behavior doesn’t seem unreasonable after all.

Thank you for the clarification, and apologies for the noise.


More information about the Gcc-bugs mailing list