PR c++/59480, DR 136
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 7 Aug 2018 16:40:18 +0000 (16:40 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 7 Aug 2018 16:40:18 +0000 (16:40 +0000)
commit6429b8e0f1ecb9fe2993a66623df1936b0886bfa
tree5c9ad3b129b647e5d47ffff789bad9149febb9d9
parent1d1b732865a2dd3a97b8a8e605d7c5906ab0df0e
PR c++/59480, DR 136

/cp
2018-08-07  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
2018-08-07  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/other/friend13.C: Likewise.
* g++.dg/other/friend14.C: Likewise.
* g++.dg/other/friend15.C: Likewise.
* g++.dg/parse/defarg4.C: Compile with -fpermissive -w.
* g++.dg/parse/defarg8.C: Likewise.

From-SVN: r263361
13 files changed:
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
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/friend13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/friend14.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/friend15.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