@@ -486,9 +486,9 @@ all::
# setting this flag the exceptions are removed, and all of
# -Wextra is used.
#
-# pedantic:
+# no-pedantic:
#
-# Enable -pedantic compilation.
+# Disable -pedantic compilation.
GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -2,8 +2,9 @@ ifeq ($(filter no-error,$(DEVOPTS)),)
DEVELOPER_CFLAGS += -Werror
SPARSE_FLAGS += -Wsparse-error
endif
-ifneq ($(filter pedantic,$(DEVOPTS)),)
+ifeq ($(filter no-pedantic,$(DEVOPTS)),)
DEVELOPER_CFLAGS += -pedantic
+DEVELOPER_CFLAGS += -Wpedantic
endif
DEVELOPER_CFLAGS += -Wall
DEVELOPER_CFLAGS += -Wdeclaration-after-statement
with the codebase firmly C99 compatible and most compilers supporting newer versions by default, could help bring visibility to problems. reverse the DEVOPTS=pedantic flag to provide a fallback for people stuck with gcc < 5 or some other compiler that either doesn't support this flag or has issues with it, and while at it also enable -Wpedantic which used to be controversial when Apple compilers and clang had widely divergent version numbers. ideally any compiler found to have issues with these flags will be added to an exception, but leaving it open for now as a weather balloon. [1] https://lore.kernel.org/git/20181127100557.53891-1-carenas@gmail.com/ Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> --- Makefile | 4 ++-- config.mak.dev | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)