From d73dac97d1ea2ba9dd53568159f70b7f89b93c8e Mon Sep 17 00:00:00 2001 From: aaaaaa123456789 Date: Fri, 14 Jan 2022 21:40:45 -0300 Subject: [PATCH] Update warning flags --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7435acd..24b5d42 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,12 @@ OPTFLAGS = -march=native -mtune=native CFLAGS = -std=c17 -Ofast -fomit-frame-pointer -fno-asynchronous-unwind-tables -fno-exceptions -Wl,-S -Wl,-x -Wl,--gc-sections $(OPTFLAGS) -DEBUGFLAGS = -Wall -Wextra -pedantic -Wcast-align -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wnull-dereference -Wshadow -Wshift-overflow=2 -Wundef \ - -Wunused -Wwrite-strings -Wno-sign-compare -Wno-implicit-fallthrough -Wno-parentheses -Wno-dangling-else -fanalyzer -fanalyzer-verbosity=0 +DEBUGFLAGS = -Wall -Wextra -pedantic -Wnull-dereference -Wshadow -Wundef -Wunused -Wwrite-strings -Wno-sign-compare -Wno-implicit-fallthrough \ + -Wno-parentheses -Wno-dangling-else -Wno-keyword-macro + +ifneq (,$(findstring gcc,$(CC))) + DEBUGFLAGS += -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wshift-overflow=2 -fanalyzer -fanalyzer-verbosity=0 +endif .PHONY: all clean basefiles debug