diff options
author | Jason Merrill <jason@redhat.com> | 2020-06-16 00:20:58 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-06-17 15:08:42 -0400 |
commit | da2c9054f1596b71e3c81efd62b6cef348e445b4 (patch) | |
tree | 59b9bf926db8129c48e0f022ac5217fd6e932596 /libvtv | |
parent | d2384b7b24f8557b66f6958a05ea99ff4307e75c (diff) | |
download | gcc-da2c9054f1596b71e3c81efd62b6cef348e445b4.zip gcc-da2c9054f1596b71e3c81efd62b6cef348e445b4.tar.gz gcc-da2c9054f1596b71e3c81efd62b6cef348e445b4.tar.bz2 |
c++: Treat in-class default/delete as definitions.
We were complaining about a constrained defaulted non-template friend in a
template class because funcdef_flag wasn't set. grokdeclarator would set it
for default/delete, but grokfield wasn't passing the 'initialized' values
needed. Fixing that revealed some errors in existing tests that we weren't
diagnosing. Since we accepted them for so long, I'm reducing the error to a
pedwarn to ease compiler upgrade.
gcc/cp/ChangeLog:
* decl2.c (grokfield): Pass SD_DEFAULTED and SD_DELETED.
* decl.c (duplicate_decls): Reduce error for delete
after earlier declaration to pedwarn.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/pr62101.C: Expect error.
* g++.dg/cpp0x/pr80259.C: Expect error.
* g++.dg/cpp2a/concepts-friend8.C: New test.
Diffstat (limited to 'libvtv')
0 files changed, 0 insertions, 0 deletions