https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67574
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The location was fixed in GCC 10+: <source>:7:1: error: definition of explicitly-defaulted 'X::X()' 7 | X::X() = default; | ^ <source>:6:1: note: 'X::X()' explicitly defaulted here 6 | X::X() = default; | ^ Is that enough to fix this issue? Note here is clang produces: <source>:7:4: error: redefinition of 'X' X::X() = default; ^ <source>:6:4: note: previous definition is here X::X() = default; ^