only use -Werror flags with gcc 4.2.x and 4.3.x.
could use a better test here though.
This commit is contained in:
@@ -268,16 +268,22 @@ def generate(env):
|
|||||||
ccflags += [
|
ccflags += [
|
||||||
'-Wall',
|
'-Wall',
|
||||||
'-Wmissing-field-initializers',
|
'-Wmissing-field-initializers',
|
||||||
'-Werror=pointer-arith',
|
|
||||||
'-Wno-long-long',
|
'-Wno-long-long',
|
||||||
'-ffast-math',
|
'-ffast-math',
|
||||||
'-fmessage-length=0', # be nice to Eclipse
|
'-fmessage-length=0', # be nice to Eclipse
|
||||||
]
|
]
|
||||||
cflags += [
|
cflags += [
|
||||||
'-Werror=declaration-after-statement',
|
|
||||||
'-Wmissing-prototypes',
|
'-Wmissing-prototypes',
|
||||||
'-std=gnu99',
|
'-std=gnu99',
|
||||||
]
|
]
|
||||||
|
if env['CCVERSION'].startswith('4.2.') or
|
||||||
|
env['CCVERSION'].startswith('4.3.'):
|
||||||
|
ccflags += [
|
||||||
|
'-Werror=pointer-arith',
|
||||||
|
]
|
||||||
|
cflags += [
|
||||||
|
'-Werror=declaration-after-statement',
|
||||||
|
]
|
||||||
if msvc:
|
if msvc:
|
||||||
# See also:
|
# See also:
|
||||||
# - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx
|
# - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx
|
||||||
|
Reference in New Issue
Block a user