Disable strict aliasing

Strict aliasing allows to compiler to make some optimisations, but they aren't
without risk. The benefits do not appear to be worth the risk.
This commit is contained in:
Matthew Barr 2016-06-22 15:03:22 +10:00
parent 8699e35c09
commit f9ded59361

View File

@ -173,8 +173,8 @@ else()
endif()
# set compiler flags - more are tested and added later
set(EXTRA_C_FLAGS "-std=c99 -Wall -Wextra -Wshadow -Wcast-qual")
set(EXTRA_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wno-shadow -Wswitch -Wreturn-type -Wcast-qual -Wno-deprecated -Wnon-virtual-dtor")
set(EXTRA_C_FLAGS "-std=c99 -Wall -Wextra -Wshadow -Wcast-qual -fno-strict-aliasing")
set(EXTRA_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wno-shadow -Wswitch -Wreturn-type -Wcast-qual -Wno-deprecated -Wnon-virtual-dtor -fno-strict-aliasing")
if (NOT RELEASE_BUILD)
# -Werror is most useful during development, don't potentially break
# release builds