public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/104379] New: [p/10/11/12 Regression] -Wshadow warning given three times
Date: Fri, 04 Feb 2022 11:12:57 +0000	[thread overview]
Message-ID: <bug-104379-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 104379
           Summary: [p/10/11/12 Regression] -Wshadow warning given three
                    times
           Product: gcc
           Version: 11.2.1
            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 S {
  int x;
  S(int x) { (void)x; }
};


shad.C: In constructor 'S::S(int)':
shad.C:3:12: warning: declaration of 'x' shadows a member of 'S' [-Wshadow]
    3 |   S(int x) { (void)x; }
      |            ^
shad.C:2:7: note: shadowed declaration is here
    2 |   int x;
      |       ^
shad.C: In constructor 'S::S(int)':
shad.C:3:23: warning: declaration of 'x' shadows a member of 'S' [-Wshadow]
    3 |   S(int x) { (void)x; }
      |                       ^
shad.C:2:7: note: shadowed declaration is here
    2 |   int x;
      |       ^
shad.C: In constructor 'S::S(int)':
shad.C:3:23: warning: declaration of 'x' shadows a member of 'S' [-Wshadow]
    3 |   S(int x) { (void)x; }
      |                       ^
shad.C:2:7: note: shadowed declaration is here
    2 |   int x;
      |       ^

             reply	other threads:[~2022-02-04 11:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 11:12 redi at gcc dot gnu.org [this message]
2022-02-04 11:13 ` [Bug c++/104379] [9/10/11/12 " redi at gcc dot gnu.org
2022-02-04 11:20 ` redi at gcc dot gnu.org
2022-02-04 11:47 ` rguenth at gcc dot gnu.org
2022-02-04 11:54 ` rguenth at gcc dot gnu.org
2022-02-04 12:06 ` redi at gcc dot gnu.org
2022-02-04 12:07 ` redi at gcc dot gnu.org
2022-02-04 13:29 ` rguenther at suse dot de
2022-02-04 13:32 ` rguenth at gcc dot gnu.org
2022-02-07 14:07 ` jakub at gcc dot gnu.org
2022-02-08 19:18 ` cvs-commit at gcc dot gnu.org
2022-02-08 19:20 ` [Bug c++/104379] [9/10/11 " jakub at gcc dot gnu.org
2022-02-09  7:18 ` rguenther at suse dot de
2022-05-27  9:47 ` [Bug c++/104379] [10/11 " rguenth at gcc dot gnu.org
2022-06-28 10:47 ` jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug c++/104379] [11 " rguenth 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-104379-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: link
Be 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).