https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110802
Bug ID: 110802
Summary: Missing warning for attribute deprecated on a function
template definition with a previous declaration
Product: gcc
Version: 13.1.1
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
template<typename RAIter>
void
random_shuffle(RAIter, RAIter);
template<typename RAIter>
__attribute__ ((deprecated))
void
random_shuffle(RAIter, RAIter) { }
int main()
{
int* p = 0;
random_shuffle(p, p);
}
This is based on std::random_shuffle in libstdc++, which I noticed warns with
Clang but not with GCC.
I added the attribute in r12-2700-g7f2f4b87910506 but it's never warned with
GCC. This doesn't seem to be a regression, as GCC 4.1.2 doesn't warn either.