[Bug c++/88245] New: Wrong location for "explicitly defaulted here"
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 28 15:18:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88245
Bug ID: 88245
Summary: Wrong location for "explicitly defaulted here"
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
struct X
{
~X();
};
X::~X() = default;
X::~X() = default;
With all versions this says:
expl.cc:8:1: error: definition of explicitly-defaulted 'X::~X()'
8 | X::~X() = default;
| ^
expl.cc:1:8: note: 'X::~X()' explicitly defaulted here
1 | struct X
| ^
This is very unhelpful. The location of the "explicitly defaulted here" note
doesn't tell you where the first definition was (it could be nowhere near the
second definition, maybe in some included header). It certainly wasn't where
the "here" says.
More information about the Gcc-bugs
mailing list