Skip to content

Commit 527e765

Browse files
committed
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.
1 parent 5bb402b commit 527e765

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

win32/GNUmakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,11 @@ OPTIMIZE = -Os
619619
LINK_DBG = -s
620620
endif
621621

622-
EXTRACFLAGS =
622+
EXTRACFLAGS = -Wall -Wextra -Werror=pointer-arith -Wno-format -Wno-long-long -Werror=vla
623623
ifeq ($(USE_CPLUSPLUS),define)
624624
EXTRACFLAGS += $(CXX_FLAG)
625+
else
626+
EXTRACFLAGS += -std=c99
625627
endif
626628
CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
627629
LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(subst ;," -L",$(CCLIBDIR))"

0 commit comments

Comments
 (0)