public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67960] New: Prefixing a function with [[deprecated]] produces multiple warnings
@ 2015-10-14  6:23 chrisb2244 at gmail dot com
  2020-03-13 14:39 ` [Bug c++/67960] [8/9 Regression] " ppalka at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: chrisb2244 at gmail dot com @ 2015-10-14  6:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67960

            Bug ID: 67960
           Summary: Prefixing a function with [[deprecated]] produces
                    multiple warnings
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chrisb2244 at gmail dot com
  Target Milestone: ---

The [[deprecated]] prefix for a function produces multiple warnings.

In v5.2.0, there are 3 warnings for the code

    [[deprecated]] void doNothing(){}
    int main(){
        doNothing();
    }

I am informed that in v4.9.2, only 2 warnings are emitted for the same code - 
http://stackoverflow.com/questions/33117030/when-using-deprecated-the-warning-is-given-3-times?noredirect=1#comment54048535_33117030

Replacing the body of main with

    auto f = doNothing;
    f();

reduces the output to 2 warnings in v5.2.0, and apparently 1 warning in 4.9.2


Bug 17729 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17729) seems to be
about a similar issue (the same issue?) but there discusses the attribute
rather than a tag - I assume the tag is implemented in terms of the attribute
but am unsure hence a new bug report.


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

end of thread, other threads:[~2022-05-27  8:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14  6:23 [Bug c++/67960] New: Prefixing a function with [[deprecated]] produces multiple warnings chrisb2244 at gmail dot com
2020-03-13 14:39 ` [Bug c++/67960] [8/9 Regression] " ppalka at gcc dot gnu.org
2020-03-15 12:02 ` marxin at gcc dot gnu.org
2020-03-20 17:56 ` egallager at gcc dot gnu.org
2020-03-24 14:49 ` ppalka at gcc dot gnu.org
2021-05-14  9:47 ` [Bug c++/67960] [9 " jakub at gcc dot gnu.org
2021-06-01  8:07 ` rguenth at gcc dot gnu.org
2022-05-27  8:03 ` rguenth 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).