From 527e765cf579b4374cbeb60151f3d7bbb138bdf1 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 15 Jan 2024 15:26:23 +1100 Subject: [PATCH] win32/GNUmakefile: enable warnings for gcc Warnings are already enabled for MSVC, so enable them for GCC too. -Wformat is disabled since the default "__printf__" format checker doesn't understand the C99-isms like "%zd", resulting in many spurious warnings. The __gnu_printf__ checker does understand them, but it doesn't understand the Windows specific "%I64d" and similar formats. --- win32/GNUmakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/win32/GNUmakefile b/win32/GNUmakefile index e71347e7dd3b..521f5961c928 100644 --- a/win32/GNUmakefile +++ b/win32/GNUmakefile @@ -619,9 +619,11 @@ OPTIMIZE = -Os LINK_DBG = -s endif -EXTRACFLAGS = +EXTRACFLAGS = -Wall -Wextra -Werror=pointer-arith -Wno-format -Wno-long-long -Werror=vla ifeq ($(USE_CPLUSPLUS),define) EXTRACFLAGS += $(CXX_FLAG) +else +EXTRACFLAGS += -std=c99 endif CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(subst ;," -L",$(CCLIBDIR))"