Skip to content

Commit f7f2e79

Browse files
committed
Merge pull request #104841 from akien-mga/scons-gcc--Wvirtual-inheritance
SCons: Only set GCC `-Wvirtual-inheritance` for C++ and `warnings=extra`
2 parents fd27e4f + a2f200c commit f7f2e79

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

SConstruct

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -862,12 +862,7 @@ else: # GCC, Clang
862862
common_warnings = []
863863

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

0 commit comments

Comments
 (0)