http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50455
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal --- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-19 13:35:27 UTC --- the gold linker detects some ODR violations note that there's a good reason the standard says "no diagnostic required" - consider if the constructor is defined inline in a header, one translation unit is compiled using the header, then the constructor definition in the header is changed, a second translation unit is compiled using the header and linked to the first object - you now have two copies of the inline constructor that don't agree, even thought they are the exact same function for the same class, defined on the same line of the same header. The linker can't even compare instructions in the objects because they could differ for valid reasons, e.g. due to different optimisations. In general, it is the user's responsibility to avoid ODR violations.