re PR c++/59480 (Missing error diagnostic: friend declaration specifying a default...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 18 Jul 2018 10:27:12 +0000 (10:27 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 18 Jul 2018 10:27:12 +0000 (10:27 +0000)
commit6498dea6b231eb72d70ffeb250f716f62fcc18da
tree30d2740b6b32011ab9fb66e2b139f3f926b6bbb5
parent0559979c6428e3b0dd5f181634a3c6775b3babd6
re PR c++/59480 (Missing error diagnostic: friend declaration specifying a default argument must be a definition)

/cp
2018-07-18  Paolo Carlini  <paolo.carlini@oracle.com>

* class.c (note_name_declared_in_class): Prefer permerror + inform
to a pair of permerrors; use DECL_SOURCE_LOCATION.

/testsuite
2018-07-18  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/ext/uow-3.C: Adjust.
* g++.dg/ext/uow-4.C: Likewise.
* g++.dg/lookup/name-clash11.C: Likewise.
* g++.dg/lookup/name-clash7.C: Likewise.
* g++.dg/lookup/redecl1.C: Likewise.
* g++.dg/warn/changes-meaning.C: Likewise.
* g++.old-deja/g++.jason/scoping8.C: Likewise.
* g++.old-deja/g++.law/nest1.C: Likewise.

/cp
2019-07-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/59480, DR 136
* decl.c (check_no_redeclaration_friend_default_args): New.
(duplicate_decls): Use the latter; also check that a friend
declaration specifying default arguments is a definition.

/testsuite
2019-07-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/59480, DR 136
* g++.dg/other/friend8.C: New.
* g++.dg/other/friend9.C: Likewise.
* g++.dg/other/friend10.C: Likewise.
* g++.dg/other/friend11.C: Likewise.
* g++.dg/other/friend12.C: Likewise.
* g++.dg/parse/defarg4.C: Compile with -fpermissive -w.
* g++.dg/parse/defarg8.C: Likewise.

From-SVN: r262851
19 files changed:
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/uow-3.C
gcc/testsuite/g++.dg/ext/uow-4.C
gcc/testsuite/g++.dg/lookup/name-clash11.C
gcc/testsuite/g++.dg/lookup/name-clash7.C
gcc/testsuite/g++.dg/lookup/redecl1.C
gcc/testsuite/g++.dg/other/friend10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/friend11.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/friend12.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/friend8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/friend9.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/defarg4.C
gcc/testsuite/g++.dg/parse/defarg8.C
gcc/testsuite/g++.dg/warn/changes-meaning.C
gcc/testsuite/g++.old-deja/g++.jason/scoping8.C
gcc/testsuite/g++.old-deja/g++.law/nest1.C