diff --git a/SConstruct b/SConstruct index 569ee24d8506..94574aacb226 100644 --- a/SConstruct +++ b/SConstruct @@ -861,7 +861,7 @@ else: # GCC, Clang if cc_version_major >= 11: # Broke on MethodBind templates before GCC 11. env.Append(CCFLAGS=["-Wlogical-op"]) elif methods.using_clang(env) or methods.using_emcc(env): - env.Append(CCFLAGS=["-Wimplicit-fallthrough", "-Wno-undefined-var-template"]) + env.Append(CCFLAGS=["-Wimplicit-fallthrough"]) elif env["warnings"] == "all": env.Append(CCFLAGS=["-Wall"] + common_warnings) elif env["warnings"] == "moderate": diff --git a/core/os/safe_binary_mutex.h b/core/os/safe_binary_mutex.h index 4ca4b50b02cd..8af2f0d856b6 100644 --- a/core/os/safe_binary_mutex.h +++ b/core/os/safe_binary_mutex.h @@ -37,6 +37,9 @@ #ifdef THREADS_ENABLED +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundefined-var-template" + // A very special kind of mutex, used in scenarios where these // requirements hold at the same time: // - Must be used with a condition variable (only binary mutexes are suitable). @@ -105,6 +108,8 @@ class MutexLock> { } }; +#pragma clang diagnostic pop + #else // No threads. template