[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 --- Comment #9 from GCC Commits --- The releases/gcc-12 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:bfa7e7dfc19e07bff319636cf1bdfd57b6c68f41 commit r12-10245-gbfa7e7dfc19e07bff319636cf1bdfd57b6c68f41 Author: Jonathan Wakely Date: Wed Jul 26 14:05:58 2023 +0100 libstdc++: Add deprecated attribute to std::random_shuffle declarations We already have these attributes on the definitions in but they don't work due to PR c++/84542. Add the attributes to the declarations in as well, and add a test. libstdc++-v3/ChangeLog: * include/bits/algorithmfwd.h (random_shuffle): Add deprecated attribute. * include/bits/stl_algo.h (random_shuffle): Correct comments. * testsuite/25_algorithms/random_shuffle/1.cc: Disable deprecated warnings. * testsuite/25_algorithms/random_shuffle/59603.cc: Likewise. * testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise. * testsuite/25_algorithms/random_shuffle/deprecated.cc: New test. (cherry picked from commit c01b344e814001e07fd304ce98d013d811e90192)
[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org Status|NEW |RESOLVED Target Milestone|--- |14.0 Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Resolution|--- |FIXED --- Comment #8 from Patrick Palka --- Fixed for GCC 14.
[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 --- Comment #7 from GCC Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:9a65c8ee659042babdb05ef15fea9910fa8d6e62 commit r14-6790-g9a65c8ee659042babdb05ef15fea9910fa8d6e62 Author: Patrick Palka Date: Thu Dec 21 14:33:56 2023 -0500 c++: [[deprecated]] on template redecl [PR84542] The deprecated and unavailable attributes weren't working when used on a template redeclaration ultimately because we weren't merging the corresponding tree flags in duplicate_decls. PR c++/84542 gcc/cp/ChangeLog: * decl.cc (merge_attribute_bits): Merge TREE_DEPRECATED and TREE_UNAVAILABLE. gcc/testsuite/ChangeLog: * g++.dg/ext/attr-deprecated-2.C: No longer XFAIL. * g++.dg/ext/attr-unavailable-12.C: New test.
[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 --- Comment #6 from CVS Commits --- The releases/gcc-13 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:3f78294969641cb762dc2abcd832c7d3edeefa79 commit r13-7624-g3f78294969641cb762dc2abcd832c7d3edeefa79 Author: Jonathan Wakely Date: Wed Jul 26 14:05:58 2023 +0100 libstdc++: Add deprecated attribute to std::random_shuffle declarations We already have these attributes on the definitions in but they don't work due to PR c++/84542. Add the attributes to the declarations in as well, and add a test. libstdc++-v3/ChangeLog: * include/bits/algorithmfwd.h (random_shuffle): Add deprecated attribute. * include/bits/stl_algo.h (random_shuffle): Correct comments. * testsuite/25_algorithms/random_shuffle/1.cc: Disable deprecated warnings. * testsuite/25_algorithms/random_shuffle/59603.cc: Likewise. * testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise. * testsuite/25_algorithms/random_shuffle/deprecated.cc: New test. (cherry picked from commit c01b344e814001e07fd304ce98d013d811e90192)
[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 --- Comment #5 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:c01b344e814001e07fd304ce98d013d811e90192 commit r14-2796-gc01b344e814001e07fd304ce98d013d811e90192 Author: Jonathan Wakely Date: Wed Jul 26 14:05:58 2023 +0100 libstdc++: Add deprecated attribute to std::random_shuffle declarations We already have these attributes on the definitions in but they don't work due to PR c++/84542. Add the attributes to the declarations in as well, and add a test. libstdc++-v3/ChangeLog: * include/bits/algorithmfwd.h (random_shuffle): Add deprecated attribute. * include/bits/stl_algo.h (random_shuffle): Correct comments. * testsuite/25_algorithms/random_shuffle/1.cc: Disable deprecated warnings. * testsuite/25_algorithms/random_shuffle/59603.cc: Likewise. * testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise. * testsuite/25_algorithms/random_shuffle/deprecated.cc: New test.
[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 --- Comment #4 from Jonathan Wakely --- This affects std::random_shuffle in libstdc++, which only warns with clang, not gcc. The attribute needs to be on the first declaration to work with gcc.
[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-07-25 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #3 from Andrew Pinski --- Confirmed.
[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 Andrew Pinski changed: What|Removed |Added CC||redi at gcc dot gnu.org --- Comment #2 from Andrew Pinski --- *** Bug 110802 has been marked as a duplicate of this bug. ***
[Bug c++/84542] missing -Wdeprecated-declarations on a redeclared function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84542 Martin Sebor changed: What|Removed |Added Keywords||diagnostic --- Comment #1 from Martin Sebor --- This never worked correctly in GCC so it's not a regression. It works as expected in Clang and ICC, and with [[deprecated]] also in MSVC.