From e55e56b5fcf872f6f08e12d5a046c2dc9ae07b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 3 May 2022 11:28:51 +0200 Subject: [PATCH] SCons: Don't enable any `-Werror=return-type` outside `werror=yes` We shouldn't presume that future compilers will not have false positives or find new occurrences of this warning, which would break compiling old versions of the engine without passing custom `CXXFLAGS`. Follow-up to #60652. (cherry picked from commit e55d30768a83f027f2c36e106e0ad5320723709d) --- SConstruct | 4 ---- 1 file changed, 4 deletions(-) diff --git a/SConstruct b/SConstruct index 6ddefe6a04c..843d91f2db1 100644 --- a/SConstruct +++ b/SConstruct @@ -484,10 +484,6 @@ if selected_platform in platform_list: env.Append(CCFLAGS=["-Werror"]) if methods.using_gcc(env) and version[0] >= 12: # False positives in our error macros, see GH-58747. env.Append(CCFLAGS=["-Wno-error=return-type"]) - else: # Always enable those errors. - # False positives in our error macros, see GH-58747. - if not (methods.using_gcc(env) and version[0] >= 12): - env.Append(CCFLAGS=["-Werror=return-type"]) if hasattr(detect, "get_program_suffix"): suffix = "." + detect.get_program_suffix()