summaryrefslogtreecommitdiff
path: root/config.mak.dev
diff options
context:
space:
mode:
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>2021-09-03 17:02:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-03 18:40:30 (GMT)
commit6a8cbc41bacb853e723b1ae3fcc2277535d2ba52 (patch)
tree90ec8d19b4aad137a0e0e8b7a03328705e63ffaa /config.mak.dev
parent27e0c3c6cfead8fccd16105be497dba7ccd0ec6b (diff)
downloadgit-6a8cbc41bacb853e723b1ae3fcc2277535d2ba52.zip
git-6a8cbc41bacb853e723b1ae3fcc2277535d2ba52.tar.gz
git-6a8cbc41bacb853e723b1ae3fcc2277535d2ba52.tar.bz2
developer: enable pedantic by default
With the codebase firmly C99 compatible and most compilers supporting newer versions by default, it 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[1] 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, and indeed, one was added to safely process windows headers that would use non standard print identifiers, but it is expected that more will be needed, so it could be considered 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.mak.dev')
-rw-r--r--config.mak.dev4
1 files changed, 3 insertions, 1 deletions
diff --git a/config.mak.dev b/config.mak.dev
index 5424db5..c080ac0 100644
--- a/config.mak.dev
+++ b/config.mak.dev
@@ -7,9 +7,11 @@ DEVELOPER_CFLAGS += -Werror
SPARSE_FLAGS += -Wsparse-error
endif
DEVELOPER_CFLAGS += -Wall
-ifneq ($(filter pedantic,$(DEVOPTS)),)
+ifeq ($(filter no-pedantic,$(DEVOPTS)),)
DEVELOPER_CFLAGS += -pedantic
+DEVELOPER_CFLAGS += -Wpedantic
ifneq ($(filter gcc5,$(COMPILER_FEATURES)),)
+DEVELOPER_CFLAGS += -Wno-pedantic-ms-format
DEVELOPER_CFLAGS += -Wno-incompatible-pointer-types
endif
endif