diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-04-25 07:15:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-04-25 07:15:47 +0200 |
commit | acb0c5194690d2751d2211bf91aec21da2fadc26 (patch) | |
tree | e3dcf3bb2c1c99d61f4c7236aed232aa9d5c1965 | |
parent | 561db36b8abb5ad1db7f5dbd827d4cd1794b0860 (diff) |
Update ODB compiler plugin to work with GCC 14
-rw-r--r-- | odb/odb/cxx-lexer.cxx | 4 | ||||
-rw-r--r-- | odb/odb/processor.cxx | 18 |
2 files changed, 18 insertions, 4 deletions
diff --git a/odb/odb/cxx-lexer.cxx b/odb/odb/cxx-lexer.cxx index 67493b7..e4e0229 100644 --- a/odb/odb/cxx-lexer.cxx +++ b/odb/odb/cxx-lexer.cxx @@ -216,7 +216,9 @@ cxx_string_lexer () linemap_init (&line_map_); #endif -#if BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 6 +#if BUILDING_GCC_MAJOR >= 14 + line_map_.m_round_alloc_size = ggc_round_alloc_size; +#elif BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 6 line_map_.round_alloc_size = ggc_round_alloc_size; #endif diff --git a/odb/odb/processor.cxx b/odb/odb/processor.cxx index d48baa7..fb129fa 100644 --- a/odb/odb/processor.cxx +++ b/odb/odb/processor.cxx @@ -458,8 +458,14 @@ namespace // functions. Note that TREE_PUBLIC() returns something // other than what we need. // - if (!DECL_NONSTATIC_MEMBER_FUNCTION_P (f) || - TREE_PRIVATE (f) || TREE_PROTECTED (f)) + if ( +#if BUILDING_GCC_MAJOR >= 14 + !DECL_OBJECT_MEMBER_FUNCTION_P (f) +#else + !DECL_NONSTATIC_MEMBER_FUNCTION_P (f) +#endif + || TREE_PRIVATE (f) + || TREE_PROTECTED (f)) continue; found_type r (k == "get" @@ -568,7 +574,13 @@ namespace #endif // We are only interested in non-static member functions. // - if (!DECL_NONSTATIC_MEMBER_FUNCTION_P (f)) + if ( +#if BUILDING_GCC_MAJOR >= 14 + !DECL_OBJECT_MEMBER_FUNCTION_P (f) +#else + !DECL_NONSTATIC_MEMBER_FUNCTION_P (f) +#endif + ) continue; if ((k == "get" |