File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ EXTRA_WARNINGS += -Wno-system-headers
32
32
EXTRA_WARNINGS += -Wold-style-definition
33
33
EXTRA_WARNINGS += -Wpacked
34
34
EXTRA_WARNINGS += -Wredundant-decls
35
- EXTRA_WARNINGS += -Wshadow
36
35
EXTRA_WARNINGS += -Wstrict-prototypes
37
36
EXTRA_WARNINGS += -Wswitch-default
38
37
EXTRA_WARNINGS += -Wswitch-enum
69
68
# will do for now and keep the above -Wstrict-aliasing=3 in place
70
69
# in newer systems.
71
70
# Needed for the __raw_cmpxchg in tools/arch/x86/include/asm/cmpxchg.h
71
+ #
72
+ # See https://lkml.org/lkml/2006/11/28/253 and https://gcc.gnu.org/gcc-4.8/changes.html,
73
+ # that takes into account Linus's comments (search for Wshadow) for the reasoning about
74
+ # -Wshadow not being interesting before gcc 4.8.
75
+
72
76
ifneq ($(filter 3.%,$(MAKE_VERSION)),) # make-3
73
77
EXTRA_WARNINGS += -fno-strict-aliasing
78
+ EXTRA_WARNINGS += -Wno-shadow
79
+ else
80
+ EXTRA_WARNINGS += -Wshadow
74
81
endif
75
82
76
83
ifneq ($(findstring $(MAKEFLAGS), w),w)
You can’t perform that action at this time.
0 commit comments