1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

SCons: Only set GCC -Wvirtual-inheritance for C++ and warnings=extra

This commit is contained in:
Rémi Verschelde
2025-03-31 15:37:47 +02:00
parent 0fcc19854f
commit a2f200c5d6

View File

@@ -862,12 +862,7 @@ else: # GCC, Clang
common_warnings = [] common_warnings = []
if methods.using_gcc(env): if methods.using_gcc(env):
common_warnings += [ common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]
"-Wshadow",
"-Wno-misleading-indentation",
# For optimized Object::cast_to / object.inherits_from()
"-Wvirtual-inheritance",
]
if cc_version_major < 11: if cc_version_major < 11:
# Regression in GCC 9/10, spams so much in our variadic templates # Regression in GCC 9/10, spams so much in our variadic templates
# that we need to outright disable it. # that we need to outright disable it.
@@ -895,7 +890,7 @@ else: # GCC, Clang
"-Wstringop-overflow=4", "-Wstringop-overflow=4",
] ]
) )
env.Append(CXXFLAGS=["-Wplacement-new=1"]) env.Append(CXXFLAGS=["-Wplacement-new=1", "-Wvirtual-inheritance"])
# Need to fix a warning with AudioServer lambdas before enabling. # Need to fix a warning with AudioServer lambdas before enabling.
# if cc_version_major != 9: # GCC 9 had a regression (GH-36325). # if cc_version_major != 9: # GCC 9 had a regression (GH-36325).
# env.Append(CXXFLAGS=["-Wnoexcept"]) # env.Append(CXXFLAGS=["-Wnoexcept"])