Changeset - r22447:de33fbaa2205
[Not reviewed]
master
0 2 0
frosch - 8 years ago 2016-09-05 19:11:01
frosch@openttd.org
(svn r27654) -Change: Enable C++11 for clang 3.3 (LordAro)
2 files changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -1282,13 +1282,13 @@ make_compiler_cflags() {
 

	
 
		# aliasing rules are not held in openttd code
 
		flags="$flags -fno-strict-aliasing"
 

	
 
		# -W alone doesn't enable all warnings enabled by -Wall; on the other hand,
 
		# -Weverything enables too many useless warnings that can't be disabled (as of 3.0)
 
		flags="$flags -Wall -W"
 
		flags="$flags -Wall -W -Wextra"
 

	
 
		# warning: unused parameter '...'
 
		flags="$flags -Wno-unused-parameter"
 

	
 
		# warning: expression result unused
 
		flags="$flags -Wno-unused-value"
 
@@ -1323,12 +1323,17 @@ make_compiler_cflags() {
 

	
 
		if [ "$enable_assert" -eq "0" ]; then
 
			# do not warn about unused variables when building without asserts
 
			flags="$flags -Wno-unused-variable"
 
		fi
 

	
 
		if [ "$cc_version" -ge "33" ]; then
 
			# clang completed C++11 support in version 3.3
 
			flags="$flags -std=c++11"
 
		fi
 

	
 
		# rdynamic is used to get useful stack traces from crash reports.
 
		ldflags="$ldflags -rdynamic"
 
	else
 
		# Enable some things only for certain GCC versions
 
		# cc_version = major_version * 100 + minor_version
 
		# For example: "3.3" -> 303, "4.9.2" -> 409, "6" -> 600, "23.5" -> 2305
src/table/newgrf_debug_data.h
Show inline comments
 
@@ -14,13 +14,13 @@
 

	
 
/* Helper for filling property tables */
 
#define NIP(prop, base, variable, type, name) { name, (ptrdiff_t)cpp_offsetof(base, variable), cpp_sizeof(base, variable), prop, type }
 
#define NIP_END() { NULL, 0, 0, 0, 0 }
 

	
 
/* Helper for filling callback tables */
 
#define NIC(cb_id, base, variable, bit) { #cb_id, cpp_offsetof(base, variable), cpp_sizeof(base, variable), bit, cb_id }
 
#define NIC(cb_id, base, variable, bit) { #cb_id, (ptrdiff_t)cpp_offsetof(base, variable), cpp_sizeof(base, variable), bit, cb_id }
 
#define NIC_END() { NULL, 0, 0, 0, 0 }
 

	
 
/* Helper for filling variable tables */
 
#define NIV(var, name) { name, var }
 
#define NIV_END() { NULL, 0 }
 

	
0 comments (0 inline, 0 general)