public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94588] New: Improve redeclared parameter name diagnostic
@ 2020-04-13 22:56 mpolacek at gcc dot gnu.org
  2020-04-13 22:57 ` [Bug c++/94588] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-04-13 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94588
           Summary: Improve redeclared parameter name diagnostic
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

void
f (int i)
{
  int i;
}

is correctly rejected ([basic.scope.param]) but we don't print the previous
decl:

$ g++ -c p.C
p.C: In function ‘void f(int)’:
p.C:4:7: error: declaration of ‘int i’ shadows a parameter
    4 |   int i;
      |       ^

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

end of thread, other threads:[~2020-04-14  3:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 22:56 [Bug c++/94588] New: Improve redeclared parameter name diagnostic mpolacek at gcc dot gnu.org
2020-04-13 22:57 ` [Bug c++/94588] " mpolacek at gcc dot gnu.org
2020-04-13 23:01 ` mpolacek at gcc dot gnu.org
2020-04-14  3:12 ` cvs-commit at gcc dot gnu.org
2020-04-14  3:13 ` mpolacek 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).