public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jan.kratochvil at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57709] -Wshadow is too strict / has false positives
Date: Tue, 19 Nov 2013 13:40:00 -0000	[thread overview]
Message-ID: <bug-57709-4-ZUgOBuhv5c@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57709-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57709

--- Comment #8 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
Created attachment 31248
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31248&action=edit
Comment 7 patch as a file

I still get both warnings, applied the patch to:
g++ (GCC) 4.9.0 20131119 (experimental)


shadow2.C: In member function ‘void C::m()’:
shadow2.C:4:18: warning: declaration of ‘both_var’ shadows a member of ‘C’
[-Wshadow]
   void m() { int both_var, var_and_method; }
                  ^
shadow2.C:2:7: note: shadowed declaration is here
   int both_var;
       ^
shadow2.C:4:28: warning: declaration of ‘var_and_method’ shadows a member of
‘C’ [-Wshadow]
   void m() { int both_var, var_and_method; }
                            ^
shadow2.C:3:8: note: shadowed declaration is here
   void var_and_method() {}
        ^
shadow2.C:4:18: warning: unused variable ‘both_var’ [-Wunused-variable]
   void m() { int both_var, var_and_method; }
                  ^
shadow2.C:4:28: warning: unused variable ‘var_and_method’ [-Wunused-variable]
   void m() { int both_var, var_and_method; }
                            ^
>From gcc-bugs-return-435052-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 19 13:40:12 2013
Return-Path: <gcc-bugs-return-435052-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 12845 invoked by alias); 19 Nov 2013 13:40:11 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 12726 invoked by uid 48); 19 Nov 2013 13:40:08 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/59006] [4.9 Regression] internal compiler error: in vect_transform_stmt, at tree-vect-stmts.c:5963
Date: Tue, 19 Nov 2013 13:40:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status assigned_to
Message-ID: <bug-59006-4-fYDj79mtAb@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59006-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59006-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg01829.txt.bz2
Content-length: 468

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY006

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.


  parent reply	other threads:[~2013-11-19 13:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 13:52 [Bug c++/57709] New: " jan.kratochvil at redhat dot com
2013-06-25 15:52 ` [Bug c++/57709] " pinskia at gcc dot gnu.org
2013-06-25 16:17 ` jakub at gcc dot gnu.org
2013-06-25 16:40 ` jan.kratochvil at redhat dot com
2013-06-25 16:46 ` manu at gcc dot gnu.org
2013-06-25 18:00 ` manu at gcc dot gnu.org
2013-11-19  6:31 ` manu at gcc dot gnu.org
2013-11-19 13:40 ` jan.kratochvil at redhat dot com [this message]
2013-11-19 16:49 ` manu at gcc dot gnu.org
2013-11-19 17:15 ` jan.kratochvil at redhat dot com
2013-12-14  7:57 ` jan.kratochvil at redhat dot com
2013-12-17 22:35 ` joseph at codesourcery dot com
2014-08-22 19:13 ` manu at gcc dot gnu.org
2015-06-09  9:33 ` gael.guennebaud at gmail dot com
2015-06-09  9:47 ` manu 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-57709-4-ZUgOBuhv5c@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).