https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107138
--- Comment #2 from carsten.andrich at gmx dot de --- (In reply to Marek Polacek from comment #1) > I see the warning even without -fsanitize=undefined. Yes. Just used -fsanitize=undefined as per the bug writing guidelines. What I forgot to mention though: The issue only occurs with -O2 or higher. -O1 and -Og compile without the warnings.