PR c++/84294 - attributes on a function template redeclaration silently discarded
authorMartin Sebor <msebor@redhat.com>
Fri, 2 Mar 2018 00:16:52 +0000 (00:16 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 2 Mar 2018 00:16:52 +0000 (17:16 -0700)
commitf454bd6436a824b4be34e5e1ba5515c5bd339980
treecee828d0eac6e44f1cc71a1ff52714d4f331aaa2
parentb3a0e110e06ad9383ba9a09be2ac61d3957596c5
PR c++/84294 - attributes on a function template redeclaration silently discarded

gcc/cp/ChangeLog:

PR c++/84294
* decl.c (check_redeclaration_no_default_args): Merge attributes
specified on redeclarations of the same function template.
Remove dead code.

gcc/testsuite/ChangeLog:

PR c++/84294
* g++.dg/ext/attr-const.C: Remove xfail.
* g++.dg/ext/attr-malloc-3.C: New test.
* g++.dg/ext/attr-noinline-3.C: New test.
* g++.dg/ext/attr-noreturn-3.C: New test.
* g++.dg/ext/attr-nothrow-3.C: New test.
* g++.dg/ext/attr-pure.C: Remove xfail.

From-SVN: r258121
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/attr-const.C
gcc/testsuite/g++.dg/ext/attr-malloc-3.C
gcc/testsuite/g++.dg/ext/attr-noinline-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/attr-noreturn-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/attr-nothrow-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/attr-pure.C