File 2021-erts-Add-gcc-compile-error-Werror-undef.patch of Package erlang
From e770c849d011d8d5872e5f1400d77c25a9268186 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Wed, 9 Nov 2016 17:25:25 +0100
Subject: [PATCH 1/3] erts: Add gcc compile error -Werror=undef
to get errors for "#if UNDEFINED_MACRO"
---
erts/configure.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/erts/configure.in b/erts/configure.in
index 4bff2eb..fe340b3 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -533,6 +533,7 @@ if test "x$GCC" = xyes; then
# Treat certain GCC warnings as errors
LM_TRY_ENABLE_CFLAG([-Werror=return-type], [WERRORFLAGS])
LM_TRY_ENABLE_CFLAG([-Werror=implicit], [WERRORFLAGS])
+ LM_TRY_ENABLE_CFLAG([-Werror=undef], [WERRORFLAGS])
# until the emulator can handle this, I suggest we turn it off!
#WFLAGS="-Wall -Wshadow -Wcast-qual -Wmissing-declarations"
--
2.10.2