https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118722
--- Comment #5 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to mauro russo from comment #4) > > an ODR violation is still an undefined behavior > > That's interesting, > > I supposed this was only for the case of multiple/different definitions. No. A simplistic example: extern int this_does_not_exist_at_all; int main() { return this_does_not_exist_at_all * 0; } GCC does not diagnose it and it's **not** a bug.