From bcea066dc65fd2fef6f0c26454f5ecc076d69430 Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Thu, 9 Apr 2015 19:56:45 +0200 Subject: Turn on strict aliasing rules Remove -fno-strict-aliasing (this is not required because gssproxy is mostly a good ISO C99/C11 citizen) and replace it with -Werror=strict-aliasing to ensure that if *anything* creeps up the build will just fail (this requires in gcc4.x's case the use of -fstrict-aliasing, too). Signed-off-by: Roland Mainz Reviewed-by: Simo Sorce --- proxy/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'proxy') diff --git a/proxy/Makefile.am b/proxy/Makefile.am index 599278d..47de3a2 100644 --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@ -36,10 +36,12 @@ if WANT_AUX_INFO AM_CFLAGS += -aux-info $@.X endif if HAVE_GCC +# -fstrict-aliasing is needed so that -W*strict-aliasing works +# properly AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \ -Wcast-qual -Wcast-align -Wwrite-strings \ - -Werror-implicit-function-declaration \ - -fno-strict-aliasing + -fstrict-aliasing -Wstrict-aliasing -Werror=strict-aliasing \ + -Werror-implicit-function-declaration endif dist_pkgconfig_DATA = -- cgit