public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100608] New: [10/11/12 Regression] -Wshadow=compatible-local false positive: function local type declaration shadows variable of different type
@ 2021-05-14 21:38 nok.raven at gmail dot com
  2021-05-17 12:30 ` [Bug c++/100608] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: nok.raven at gmail dot com @ 2021-05-14 21:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

end of thread, other threads:[~2022-05-12 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 21:38 [Bug c++/100608] New: [10/11/12 Regression] -Wshadow=compatible-local false positive: function local type declaration shadows variable of different type nok.raven at gmail dot com
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

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).