(svn r22832) -Codechange: add -Wno-free-nonheap-object to CFLAGS in order to prevent some invalid GCC warnings
This commit is contained in:
		@@ -1304,6 +1304,8 @@ make_compiler_cflags() {
 | 
				
			|||||||
			# warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
 | 
								# warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
 | 
				
			||||||
			# They are valid according to the C++ standard, but useless.
 | 
								# They are valid according to the C++ standard, but useless.
 | 
				
			||||||
			cxxflags="$cxxflags -Wno-narrowing"
 | 
								cxxflags="$cxxflags -Wno-narrowing"
 | 
				
			||||||
 | 
								# Disable bogus 'attempt to free a non-heap object' warning
 | 
				
			||||||
 | 
								flags="$flags -Wno-free-nonheap-object"
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if [ "$enable_lto" != "0" ]; then
 | 
							if [ "$enable_lto" != "0" ]; then
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -470,7 +470,7 @@ The following compilers are known to compile OpenTTD:
 | 
				
			|||||||
    Version 2005 gives bogus warnings about scoping issues.
 | 
					    Version 2005 gives bogus warnings about scoping issues.
 | 
				
			||||||
  - GNU Compiler Collection (GCC) 3.3 - 4.7.
 | 
					  - GNU Compiler Collection (GCC) 3.3 - 4.7.
 | 
				
			||||||
    Versions 4.1 and earlier give bogus warnings about uninitialised variables.
 | 
					    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.
 | 
					    Versions 4.5 and later give invalid warnings when lto is enabled.
 | 
				
			||||||
  - Intel C++ Compiler (ICC) 12.0.
 | 
					  - Intel C++ Compiler (ICC) 12.0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user