https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86342
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-06-28
CC| |jason at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'll confirm this, because the warning is caused by code outside the user's
control, but Jason might have wanted it to warn for types defined in system
headers.
Reduced:
# 1 "deprcopy.cc"
# 1 "/tmp//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "deprcopy.cc"
# 1 "deprcopy.h" 1
# 2 "deprcopy.h" 3
# 2 "deprcopy.h" 3
struct X {
X() { }
~X() { }
};
# 2 "deprcopy.cc" 2
# 2 "deprcopy.cc"
int main()
{
X x;
X y = x;
}
deprcopy.cc: In function 'int main()':
deprcopy.cc:5:9: warning: implicitly-declared 'constexpr X::X(const X&)' is
deprecated [-Wdeprecated-copy]
X y = x;
^
In file included from deprcopy.cc:1:
deprcopy.h:4:3: note: because 'X' has user-provided 'X::~X()'
~X() { }
^