public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110802] New: Missing warning for attribute deprecated on a function template definition with a previous declaration
@ 2023-07-25 12:51 redi at gcc dot gnu.org
  2023-07-25 16:16 ` [Bug c++/110802] " pinskia at gcc dot gnu.org
  2023-07-25 21:11 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-25 12:51 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-25 21:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 12:51 [Bug c++/110802] New: Missing warning for attribute deprecated on a function template definition with a previous declaration redi at gcc dot gnu.org
2023-07-25 16:16 ` [Bug c++/110802] " pinskia at gcc dot gnu.org
2023-07-25 21:11 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).