Skip to content

Commit

Permalink
kbuild: add -Wdeclaration-after-statement flag unconditionally
Browse files Browse the repository at this point in the history
We have raised the compiler requirement from time to time.
With commit cafa001 ("Raise the minimum required gcc version
to 4.6"), the minimum for GCC is 4.6 now.

This flag has been here since the pre-git era. It is documented in
the GCC 4.6 manual, and it is recognized by Clang and ICC as well.

Let's rip off the cc-option switch, and see if somebody complains
about it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
  • Loading branch information
masahir0y committed Oct 19, 2018
1 parent fb073a4 commit a33e7ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ endif
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)

# warn about C99 declaration after statement
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
KBUILD_CFLAGS += -Wdeclaration-after-statement

# disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += -Wno-pointer-sign
Expand Down

0 comments on commit a33e7ae

Please sign in to comment.