Skip to content

Commit

Permalink
win32/GNUmakefile: enable warnings for gcc
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tonycoz committed Jan 16, 2024
1 parent 5bb402b commit 527e765
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion win32/GNUmakefile
Expand Up @@ -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))"
Expand Down

0 comments on commit 527e765

Please sign in to comment.