diff options
Diffstat (limited to 'odb/traits.hxx')
-rw-r--r-- | odb/traits.hxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/odb/traits.hxx b/odb/traits.hxx index 06e7ab6..2c6f5d6 100644 --- a/odb/traits.hxx +++ b/odb/traits.hxx @@ -1,5 +1,4 @@ // file : odb/traits.hxx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file #ifndef ODB_TRAITS_HXX @@ -72,6 +71,14 @@ namespace odb typedef T value_type; typedef P pointer_type; + + // Suppress bogus use-after-free introduced in GCC 12 (GCC bug #105327). + // +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuse-after-free" +#endif + static P create () { @@ -82,6 +89,10 @@ namespace odb return p; } +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12 +#pragma GCC diagnostic pop +#endif + private: struct mem_guard { |