From 356630ced28f3101e8e2d88e3c52f8d3008515c7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Nov 2017 14:58:43 +0200 Subject: Adapt to changes in GCC 8 --- odb/cxx-lexer.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'odb/cxx-lexer.cxx') diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx index 72ebd0b..cb71740 100644 --- a/odb/cxx-lexer.cxx +++ b/odb/cxx-lexer.cxx @@ -93,7 +93,13 @@ next (string& token, tree* node) // See if this is a keyword using the C++ parser machinery and // the current C++ dialect. // - if (*type_ == CPP_NAME && C_IS_RESERVED_WORD (*token_)) + if (*type_ == CPP_NAME && +#if BUILDING_GCC_MAJOR >= 8 + IDENTIFIER_KEYWORD_P (*token_) +#else + C_IS_RESERVED_WORD (*token_) +#endif + ) *type_ = CPP_KEYWORD; if (node != 0 && node != token_) @@ -281,7 +287,13 @@ next (string& token, tree* node) // tree id (get_identifier (name)); - if (C_IS_RESERVED_WORD (id)) + if ( +#if BUILDING_GCC_MAJOR >= 8 + IDENTIFIER_KEYWORD_P (id) +#else + C_IS_RESERVED_WORD (id) +#endif + ) tt = CPP_KEYWORD; if (node != 0) -- cgit v1.1