public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95873] New: Duplicated warning message "'class' tag used in naming 'union a'"
@ 2020-06-24 16:10 haoxintu at gmail dot com
2021-12-07 5:26 ` [Bug c++/95873] " pinskia at gcc dot gnu.org
2021-12-07 5:27 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: haoxintu at gmail dot com @ 2020-06-24 16:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95873
Bug ID: 95873
Summary: Duplicated warning message "'class' tag used in naming
'union a'"
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
This code, bug.cc, GCC emits two duplicated warning messages.
$cat bug.cc
union a{};
auto var = new (typename :: a );
$g++ -c -fpermissive bug.cc
bug.cc:2:29: warning: 'class' tag used in naming 'union a' [-fpermissive]
2 | auto var = new (typename :: a );
| ^
bug.cc:1:7: note: 'union a' was previously declared here
1 | union a{};
| ^
bug.cc:2:29: warning: 'class' tag used in naming 'union a' [-fpermissive]
2 | auto var = new (typename :: a );
| ^
bug.cc:1:7: note: 'union a' was previously declared here
1 | union a{};
| ^
All GCC-6 to GCC-trunk versions have this issue.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/95873] Duplicated warning message "'class' tag used in naming 'union a'"
2020-06-24 16:10 [Bug c++/95873] New: Duplicated warning message "'class' tag used in naming 'union a'" haoxintu at gmail dot com
@ 2021-12-07 5:26 ` pinskia at gcc dot gnu.org
2021-12-07 5:27 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07 5:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95873
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 93809.
*** This bug has been marked as a duplicate of bug 93809 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/95873] Duplicated warning message "'class' tag used in naming 'union a'"
2020-06-24 16:10 [Bug c++/95873] New: Duplicated warning message "'class' tag used in naming 'union a'" haoxintu at gmail dot com
2021-12-07 5:26 ` [Bug c++/95873] " pinskia at gcc dot gnu.org
@ 2021-12-07 5:27 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07 5:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95873
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The warning is invalid in this case anyways so even though there is a
duplicated warning it only happens with valid code which should not warn at
all.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-07 5:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 16:10 [Bug c++/95873] New: Duplicated warning message "'class' tag used in naming 'union a'" haoxintu at gmail dot com
2021-12-07 5:26 ` [Bug c++/95873] " pinskia at gcc dot gnu.org
2021-12-07 5:27 ` pinskia 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).