public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "nok.raven at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100608] New: [10/11/12 Regression] -Wshadow=compatible-local false positive: function local type declaration shadows variable of different type Date: Fri, 14 May 2021 21:38:58 +0000 [thread overview] Message-ID: <bug-100608-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100608 Bug ID: 100608 Summary: [10/11/12 Regression] -Wshadow=compatible-local false positive: function local type declaration shadows variable of different type Product: gcc Version: 10.3.1 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nok.raven at gmail dot com Target Milestone: --- template <typename> class X {}; void foo() { auto a = X<class a>{}; } <source>: In function 'void foo()': <source>:5:22: warning: declaration of 'struct foo()::a' shadows a previous local [-Wshadow=compatible-local] 5 | auto a = X<class a>{}; | ^ <source>:5:10: note: shadowed declaration is here 5 | auto a = X<class a>{}; | ^ https://godbolt.org/z/hzoro9v3Y
next reply other threads:[~2021-05-14 21:38 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-14 21:38 nok.raven at gmail dot com [this message] 2021-05-17 12:30 ` [Bug c++/100608] " rguenth at gcc dot gnu.org 2022-04-05 20:16 ` jason at gcc dot gnu.org 2022-04-06 14:31 ` cvs-commit at gcc dot gnu.org 2022-04-12 20:14 ` [Bug c++/100608] [10/11 " cvs-commit at gcc dot gnu.org 2022-05-12 21:14 ` [Bug c++/100608] [10 " cvs-commit at gcc dot gnu.org 2022-05-12 21:37 ` jason at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100608-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).