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.