https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87515
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to ipelupes from comment #4) > also: adding __builtin_unreachable(); hides the warning making it even > harder to find Don't do that then :) Adding that promises the compiler your program will never reach that line of the function, so it doesn't bother warning you. If you lie to the compiler, it will get its revenge. Adding __builtin_trap() instead will terminate the program if that line is reached, which might be what you're looking for.