Commit b5daaf43 authored by Beniamino Galvani's avatar Beniamino Galvani

build: configure.ac: always set -fno-strict-aliasing

We break the aliasing rules in the code, and thus the flag should
always be enabled to prevent wrong optimizations, even without
--enable-more-warnings.
parent 76eca6ac
......@@ -920,6 +920,11 @@ AM_CONDITIONAL(BUILD_NMTUI, test "$build_nmtui" = yes)
NM_COMPILER_WARNINGS
CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-fno-strict-aliasing \
])
CFLAGS="$CFLAGS $with_cflags"
AC_ARG_ENABLE(more-asserts,
AS_HELP_STRING([--enable-more-asserts], [Enable more assertions for debugging (default: no). Deprecated option. Use --with-more-asserts=level]))
more_asserts=0
......
......@@ -66,7 +66,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \
-Wno-duplicate-decl-specifier \
-Wstrict-prototypes \
-fno-strict-aliasing -Wno-unused-but-set-variable \
-Wno-unused-but-set-variable \
-Wundef -Wimplicit-function-declaration \
-Wpointer-arith -Winit-self -Wformat-nonliteral \
-Wmissing-include-dirs -Wno-pragmas; do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment