Fix compilation for g++ 4.5

This commit is contained in:
Mark de Wever 2010-04-25 09:43:12 +00:00
parent b2b64014ef
commit 4cc313daf2
4 changed files with 11 additions and 3 deletions

View file

@ -105,7 +105,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(NOT CONFIGURED)
if(ENABLE_STRICT_COMPILATION)
set(STRICT_FLAGS "-Werror -Wno-unused-parameter")
# The current networking code breaks strict aliasing in g++ 4.5.
# Once the code is converted to boost::asio it might be reenabled.
set(STRICT_FLAGS "-Werror -Wno-unused-parameter -Wno-strict-aliasing")
else(ENABLE_STRICT_COMPILATION)
set(STRICT_FLAGS "")
endif(ENABLE_STRICT_COMPILATION)

View file

@ -371,7 +371,9 @@ for env in [test_env, client_env, env]:
if "gcc" in env["TOOLS"]:
env.AppendUnique(CCFLAGS = Split("-W -Wall"), CFLAGS = ["-std=c99"], CXXFLAGS="-std=c++98")
if env['strict']:
env.AppendUnique(CCFLAGS = Split("-Werror -Wno-unused-parameter"))
# The current networking code breaks strict aliasing in g++ 4.5.
# Once the code is converted to boost::asio it might be reenabled.
env.AppendUnique(CCFLAGS = Split("-Werror -Wno-unused-parameter -Wno-strict-aliasing"))
env["OPT_FLAGS"] = "-O2"
env["DEBUG_FLAGS"] = Split("-O0 -DDEBUG -ggdb3")

View file

@ -64,6 +64,7 @@ Version 1.9.0-svn:
* Fixed a bug in scoring of AI recall list. Patch by billynux.
* Strip whitespace characters from .ign patterns (bug #15902)
* Fixed tab completion not working in the new lobby (bug #14730)
* Fixed compilation for g++ 4.5
* Terrain animation related
* animated terrain animations are not synchronized anymore
* reworked macros to handle animations

View file

@ -107,7 +107,10 @@ if test "x$strict" = "xyes"
then
# Strict compilation for C files is disabled until somebody wants to clean them.
# CFLAGS="-Werror -Wno-unused -Wno-sign-compare $CFLAGS"
CXXFLAGS="-Werror -Wno-unused-parameter $CXXFLAGS"
# The current networking code breaks strict aliasing in g++ 4.5.
# Once the code is converted to boost::asio it might be reenabled.
CXXFLAGS="-Werror -Wno-unused-parameter -Wno-strict-aliasing $CXXFLAGS"
fi
# Make tests default in svn version