mirror of https://github.com/OpenTTD/OpenTTD
(svn r27654) -Change: Enable C++11 for clang 3.3 (LordAro)
parent
0adfb1ac6f
commit
ac6793dace
|
@ -1285,7 +1285,7 @@ make_compiler_cflags() {
|
||||||
|
|
||||||
# -W alone doesn't enable all warnings enabled by -Wall; on the other hand,
|
# -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)
|
# -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 '...'
|
# warning: unused parameter '...'
|
||||||
flags="$flags -Wno-unused-parameter"
|
flags="$flags -Wno-unused-parameter"
|
||||||
|
@ -1326,6 +1326,11 @@ make_compiler_cflags() {
|
||||||
flags="$flags -Wno-unused-variable"
|
flags="$flags -Wno-unused-variable"
|
||||||
fi
|
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.
|
# rdynamic is used to get useful stack traces from crash reports.
|
||||||
ldflags="$ldflags -rdynamic"
|
ldflags="$ldflags -rdynamic"
|
||||||
else
|
else
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#define NIP_END() { NULL, 0, 0, 0, 0 }
|
#define NIP_END() { NULL, 0, 0, 0, 0 }
|
||||||
|
|
||||||
/* Helper for filling callback tables */
|
/* 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 }
|
#define NIC_END() { NULL, 0, 0, 0, 0 }
|
||||||
|
|
||||||
/* Helper for filling variable tables */
|
/* Helper for filling variable tables */
|
||||||
|
|
Loading…
Reference in New Issue