Remove obsolete compiler test
gcc-5 and later produce the desired result by default. The current minimum gcc is gcc-10.
This commit is contained in:
parent
1cb33638c0
commit
1110b110c2
25
SConstruct
25
SConstruct
|
@ -1633,31 +1633,6 @@ static void terminate_handler()
|
|||
# blank insert, regardless of whether building for SDL1 or SDL2.
|
||||
self._check_system_library(context, header=['%s.h' % (library_format_name % '')], main=main, lib=library_name, successflags=successflags)
|
||||
|
||||
@_custom_test
|
||||
def check_compiler_missing_field_initializers(self,context,
|
||||
_testflags_warn={'CXXFLAGS' : ['-Wmissing-field-initializers']},
|
||||
_successflags_nowarn={'CXXFLAGS' : ['-Wno-missing-field-initializers']}
|
||||
):
|
||||
"""
|
||||
Test whether the compiler warns for a statement of the form
|
||||
|
||||
variable={};
|
||||
|
||||
gcc-4.x warns for this form, but -Wno-missing-field-initializers silences it.
|
||||
gcc-5 does not warn.
|
||||
|
||||
This form is used extensively in the code as a shorthand for resetting
|
||||
variables to their default-constructed value.
|
||||
"""
|
||||
text = 'struct A{int a;};'
|
||||
main = 'A a{};(void)a;'
|
||||
Compile = self.Compile
|
||||
if Compile(context, text=text, main=main, msg='whether C++ compiler accepts {} initialization', testflags=_testflags_warn) or \
|
||||
Compile(context, text=text, main=main, msg='whether C++ compiler understands -Wno-missing-field-initializers', successflags=_successflags_nowarn) or \
|
||||
not Compile(context, text=text, main=main, msg='whether C++ compiler always errors for {} initialization', expect_failure=True):
|
||||
return
|
||||
raise SCons.Errors.StopError("C++ compiler errors on {} initialization, even with -Wno-missing-field-initializers.")
|
||||
|
||||
@_custom_test
|
||||
def check_attribute_error(self,context):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue