1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

make: fast out on old-style function definitions

This commit is contained in:
René Kijewski 2014-05-07 13:02:46 +02:00
parent 073bdfe9ec
commit 8b34e8637d

View File

@ -21,3 +21,11 @@ ifeq ($(shell LANG=C $(CC) -fno-delete-null-pointer-checks -E - 2>&1 1>/dev/null
CFLAGS += -fno-delete-null-pointer-checks
endif
endif
# Fast-out on old style function definitions.
# They cause unreadable error compiler errors on missing semicolons.
# Worse yet they hide errors by accepting wildcard argument types.
ifeq ($(shell $(CC) -Wstrict-prototypes -Werror=strict-prototypes -Wold-style-definition -Werror=old-style-definition -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
# duplicated parameters don't hurt
CFLAGS += -Wstrict-prototypes -Werror=strict-prototypes -Wold-style-definition -Werror=old-style-definition
endif