tests: use -fno-strict-aliasing with variants

Reported by Théophile Ranquet.

* configure.ac (NO_STRICT_ALIAS_CXXFLAGS): New.
* tests/c++.at, tests/atlocal.in, examples/local.mk: Use it.
This commit is contained in:
Akim Demaille
2012-11-26 10:42:49 +01:00
parent 15a1a08a87
commit 2f130f199a
4 changed files with 10 additions and 1 deletions

View File

@@ -111,6 +111,8 @@ if test "$enable_gcc_warnings" = yes; then
# Warnings for the test suite only.
gl_WARN_ADD([-Wundef], [WARN_CXXFLAGS_TEST])
gl_WARN_ADD([-pedantic], [WARN_CXXFLAGS_TEST])
# Variants break strict aliasing analysis.
gl_WARN_ADD([-fno-strict-aliasing], [NO_STRICT_ALIAS_CXXFLAGS])
CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP([C++])
fi