Changeset - r18013:67be63f9346c
[Not reviewed]
master
0 2 0
smatz - 13 years ago 2011-08-24 18:21:54
smatz@openttd.org
(svn r22832) -Codechange: add -Wno-free-nonheap-object to CFLAGS in order to prevent some invalid GCC warnings
2 files changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -1295,24 +1295,26 @@ make_compiler_cflags() {
 

	
 
		if [ $cc_version -ge 43 ]; then
 
			# Use gnu++0x mode so static_assert() is available.
 
			# Don't use c++0x, it breaks mingw (with gcc 4.4.0).
 
			cxxflags="$cxxflags -std=gnu++0x"
 
		fi
 

	
 
		if [ $cc_version -ge 47 ]; then
 
			# Disable -Wnarrowing which gives many warnings, such as:
 
			# warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
 
			# They are valid according to the C++ standard, but useless.
 
			cxxflags="$cxxflags -Wno-narrowing"
 
			# Disable bogus 'attempt to free a non-heap object' warning
 
			flags="$flags -Wno-free-nonheap-object"
 
		fi
 

	
 
		if [ "$enable_lto" != "0" ]; then
 
			# GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
 
			has_lto=`$1 -dumpspecs | grep '\%{flto'`
 
			if [ -n "$has_lto" ]; then
 
				# Use LTO only if we see LTO exists and is requested
 
				if [ $cc_version -lt 46 ]; then
 
					flags="$flags -flto"
 
				else
 
					flags="$flags -flto=jobserver"
 
				fi
readme.txt
Show inline comments
 
@@ -461,25 +461,25 @@ To recompile the extra graphics needed t
 
Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well.
 
GRFCodec can be found at: http://www.openttd.org/download-grfcodec
 
The compilation of these extra graphics does generally not happen, unless
 
you remove the graphics file using "make maintainer-clean".
 

	
 
7.2) Supported compilers
 
---- -------------------
 
The following compilers are known to compile OpenTTD:
 
  - Microsoft Visual C++ (MSVC) 2005, 2008 and 2010.
 
    Version 2005 gives bogus warnings about scoping issues.
 
  - GNU Compiler Collection (GCC) 3.3 - 4.7.
 
    Versions 4.1 and earlier give bogus warnings about uninitialised variables.
 
    Versions 4.4 and later give bogus warnings about freeing non-heap objects.
 
    Versions 4.4 - 4.6 give bogus warnings about freeing non-heap objects.
 
    Versions 4.5 and later give invalid warnings when lto is enabled.
 
  - Intel C++ Compiler (ICC) 12.0.
 

	
 
The following compilers are known not to compile OpenTTD:
 
  - Microsoft Visual C++ (MSVC) 2003 and earlier.
 
  - GNU Compiler Collection (GCC) 3.2 and earlier.
 
    These old versions fail due to OpenTTD's template usage.
 
  - Intel C++ Compiler (ICC) 11.1 and earlier.
 
    Version 10.0 and earlier fail a configure check and fail with recent system
 
        headers.
 
    Version 10.1 fails to compile station_gui.cpp.
 
    Version 11.1 fails with internal error when compiling network.cpp.
0 comments (0 inline, 0 general)