mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Fix clang compiler warning
[why] Compiling with clang issues this warning (clang 10.0 and 15.0 tested): .../sol/sol.hpp:14541:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option] #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" [how] Check if the compiler does know the warning, before trying to turn the warning off. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
0386513a2d
commit
c4e843b6dd
|
@ -101,7 +101,9 @@ namespace sol {
|
|||
|
||||
#if SOL_IS_ON(SOL_COMPILER_GCC)
|
||||
#pragma GCC diagnostic push
|
||||
#if !SOL_IS_ON(SOL_COMPILER_CLANG)
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
|
|
|
@ -32,7 +32,9 @@ namespace sol { namespace stack {
|
|||
|
||||
#if SOL_IS_ON(SOL_COMPILER_GCC)
|
||||
#pragma GCC diagnostic push
|
||||
#if !SOL_IS_ON(SOL_COMPILER_CLANG)
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace stack_detail {
|
||||
|
|
Loading…
Reference in New Issue
Block a user