diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-11-22 19:12:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-11-23 00:31:22 +0300 |
commit | 4ff0126e890cebe16b4eec5c1b2bc507346b4f24 (patch) | |
tree | 9d88a5f275928c5d9e393a9fdfe6dccbdcb7ce83 /build_files/scons/config | |
parent | db1f0e36163037c94857626be8ca20dd9ae5b168 (diff) |
C99 is now the C standard for all our C code.
The main new feature is mixed variable declarations and code, which can help
reduce uninitialized variables or accidental variable reuse.
Due to incomplete C99 support in VS 2013, variable length arrays are not
supported, BLI_array_alloca must still be used. The header <tgmath.h> is also
not supported.
Differential Revision: https://developer.blender.org/D1631
Diffstat (limited to 'build_files/scons/config')
-rw-r--r-- | build_files/scons/config/darwin-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/linux-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/win32-mingw-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/win64-mingw-config.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py index 0bf03a46bd2..16ba3ec4133 100644 --- a/build_files/scons/config/darwin-config.py +++ b/build_files/scons/config/darwin-config.py @@ -248,7 +248,7 @@ REL_CXXFLAGS = [] REL_CCFLAGS = ['-O2'] CC_WARN = ['-Wall'] -C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes'] +C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wvla', '-Wno-unknown-pragmas', '-Wstrict-prototypes'] CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare'] ##FIX_STUBS_WARNINGS = -Wno-unused diff --git a/build_files/scons/config/linux-config.py b/build_files/scons/config/linux-config.py index ff8ecf0aa72..1990d6ece0a 100644 --- a/build_files/scons/config/linux-config.py +++ b/build_files/scons/config/linux-config.py @@ -254,7 +254,7 @@ REL_CFLAGS = [] REL_CXXFLAGS = [] REL_CCFLAGS = ['-O2'] -C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type'] +C_WARN = ['-Wno-char-subscripts', '-Wvla', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=vla', '-Werror=implicit-function-declaration', '-Werror=return-type'] CC_WARN = ['-Wall'] CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare'] diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py index 552a1a5cec3..f4b709dda81 100644 --- a/build_files/scons/config/win32-mingw-config.py +++ b/build_files/scons/config/win32-mingw-config.py @@ -202,7 +202,7 @@ REL_CFLAGS = [] REL_CXXFLAGS = [] REL_CCFLAGS = ['-O2'] -C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes'] +C_WARN = ['-Wno-char-subscripts', '-Wvla', '-Wstrict-prototypes'] CC_WARN = [ '-Wall' ] diff --git a/build_files/scons/config/win64-mingw-config.py b/build_files/scons/config/win64-mingw-config.py index 87a9b5e4eac..6106f2ac631 100644 --- a/build_files/scons/config/win64-mingw-config.py +++ b/build_files/scons/config/win64-mingw-config.py @@ -197,7 +197,7 @@ REL_CXXFLAGS = [] REL_CCFLAGS = ['-O2', '-ftree-vectorize'] # NOTE: C_WARN seems to get ignored - at least -Wno-char-subscripts doesn't work! -C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes'] +C_WARN = ['-Wno-char-subscripts', '-Wvla', '-Wstrict-prototypes'] CC_WARN = [ '-Wall', '-Wno-char-subscripts' ] |