aboutsummaryrefslogtreecommitdiff
path: root/odb/cxx-lexer.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-07 14:58:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-07 14:58:43 +0200
commit356630ced28f3101e8e2d88e3c52f8d3008515c7 (patch)
tree6950cfd3797bbe34e375c223e4226666fef69202 /odb/cxx-lexer.cxx
parentbc1616e3e45967ccec892d14a9337554238ca332 (diff)
Adapt to changes in GCC 8
Diffstat (limited to 'odb/cxx-lexer.cxx')
-rw-r--r--odb/cxx-lexer.cxx16
1 files changed, 14 insertions, 2 deletions
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)