mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
scons: Use '-Wmissing-field-initializers' on GCC 4.0 and greater only.
This commit is contained in:
parent
658fc7539d
commit
32502b0eeb
1 changed files with 4 additions and 1 deletions
|
|
@ -295,7 +295,6 @@ def generate(env):
|
|||
# - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
ccflags += [
|
||||
'-Wall',
|
||||
'-Wmissing-field-initializers',
|
||||
'-Wno-long-long',
|
||||
'-ffast-math',
|
||||
'-fmessage-length=0', # be nice to Eclipse
|
||||
|
|
@ -304,6 +303,10 @@ def generate(env):
|
|||
'-Wmissing-prototypes',
|
||||
'-std=gnu99',
|
||||
]
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.0'):
|
||||
ccflags += [
|
||||
'-Wmissing-field-initializers',
|
||||
]
|
||||
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
|
||||
ccflags += [
|
||||
'-Werror=pointer-arith',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue