Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(24)

Issue 4452058: [google] Add two new -Wshadow warnings (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 7 months ago by Diego Novillo
Modified:
10 years, 2 months ago
Reviewers:
Jason Merrill
CC:
Le-Chun Wu, jason_redhat.com, joseph_codesourcery.com, gcc-patches_gcc.gnu.org, Ollie Wild
Visibility:
Public.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+438 lines, -26 lines) Patch
M gcc/ChangeLog.google-main View 1 chunk +15 lines, -0 lines 0 comments Download
M gcc/c-decl.c View 2 chunks +47 lines, -20 lines 1 comment Download
M gcc/common.opt View 1 chunk +9 lines, -0 lines 0 comments Download
M gcc/cp/ChangeLog.google-main View 1 chunk +6 lines, -0 lines 0 comments Download
M gcc/cp/name-lookup.c View 1 chunk +27 lines, -5 lines 1 comment Download
gcc/doc/invoke.texi View 2 chunks +38 lines, -0 lines 0 comments Download
M gcc/opts.c View 1 chunk +9 lines, -0 lines 0 comments Download
M gcc/testsuite/ChangeLog.google-main View 1 chunk +10 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wshadow-compatible-local-1.C View 1 chunk +63 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wshadow-local-1.C View 1 chunk +35 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wshadow-local-2.C View 1 chunk +63 lines, -0 lines 0 comments Download
A gcc/testsuite/gcc.dg/Wshadow-compatible-local-1.c View 1 chunk +36 lines, -0 lines 0 comments Download
A gcc/testsuite/gcc.dg/Wshadow-local-1.c View 1 chunk +22 lines, -0 lines 0 comments Download
A gcc/testsuite/gcc.dg/Wshadow-local-2.c View 1 chunk +49 lines, -0 lines 0 comments Download
A gcc/testsuite/gcc.dg/Wshadow-local-3.c View 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 2
Diego Novillo
This patch from Le-Chun Wu adds two two new shadow warning flags for C and ...
13 years, 7 months ago (2011-04-29 14:56:14 UTC) #1
Jason Merrill
13 years, 7 months ago (2011-05-03 19:59:20 UTC) #2
codereview seems to be having trouble with the invoke.texi patch so that I can't
give inline comments there.  So I'll say it here: the documentation needs to be
clearer about the relationship between the three -Wshadow options, i.e. that
-Wshadow implies -Wshadow-local implies -Wshadow-compatible-local.

http://codereview.appspot.com/4452058/diff/1/gcc/c-decl.c
File gcc/c-decl.c (left):

http://codereview.appspot.com/4452058/diff/1/gcc/c-decl.c#oldcode2584
gcc/c-decl.c:2584: "non-variable", new_decl);
The change in how to express not giving the "previous declaration" warning in
some cases (from 'break' to code duplication) seems gratuitous to me; the new
way doesn't seem clearly better than the old.

http://codereview.appspot.com/4452058/diff/1/gcc/cp/name-lookup.c
File gcc/cp/name-lookup.c (right):

http://codereview.appspot.com/4452058/diff/1/gcc/cp/name-lookup.c#newcode1119
gcc/cp/name-lookup.c:1119: || warn_shadow_compatible_local)
Why change this condition if you aren't changing the warning code below?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b