public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101015] New: Poor diagnostic for deprecated alias-declaration
@ 2021-06-10 13:13 redi at gcc dot gnu.org
  2021-06-10 13:44 ` [Bug c++/101015] " mpolacek at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2021-06-10 13:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101015
           Summary: Poor diagnostic for deprecated alias-declaration
           Product: gcc
           Version: 12.0
            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: ---

struct A {
  typedef int good [[deprecated]];
  using bad [[deprecated]] = int;
};

A::good i = 0;
A::bad j = 0;

This prints:

depr.C:6:9: warning: 'A::good' is deprecated [-Wdeprecated-declarations]
    6 | A::good i = 0;
      |         ^
depr.C:2:15: note: declared here
    2 |   typedef int good [[deprecated]];
      |               ^~~~
depr.C:7:8: warning: 'using bad = int' is deprecated
[-Wdeprecated-declarations]
    7 | A::bad j = 0;
      |        ^
depr.C:3:9: note: declared here
    3 |   using bad [[deprecated]] = int;
      |         ^~~


When it is good it is very very good, but when it is bad it is horrid.

The second warning should print 'A::bad' not 'using bad = int'.

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

end of thread, other threads:[~2021-07-22  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 13:13 [Bug c++/101015] New: Poor diagnostic for deprecated alias-declaration redi at gcc dot gnu.org
2021-06-10 13:44 ` [Bug c++/101015] " mpolacek at gcc dot gnu.org
2021-06-11 15:50 ` mpolacek at gcc dot gnu.org
2021-07-22  9:47 ` 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).