aboutsummaryrefslogtreecommitdiff
path: root/odb/cxx-lexer.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-27 17:24:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-27 17:24:57 +0200
commit34286111363ca14aae81d50ab16732627425ef72 (patch)
tree5862221a980e92162380afa4fe31b86efdc5b54d /odb/cxx-lexer.hxx
parent52793dc8860e38f725dc0ca8300c4e2ca9d4ceb9 (diff)
GCC 4.7 compatibility changes
Diffstat (limited to 'odb/cxx-lexer.hxx')
-rw-r--r--odb/cxx-lexer.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/odb/cxx-lexer.hxx b/odb/cxx-lexer.hxx
index 11b6a35..e1e9fa5 100644
--- a/odb/cxx-lexer.hxx
+++ b/odb/cxx-lexer.hxx
@@ -11,9 +11,12 @@
#include <odb/cxx-token.hxx>
-// A C++ keyword. This is an extension to libcpp token types.
+// A C++ keyword. This is an extension to libcpp token types. GCC 4.7.0
+// adds this define.
//
-#define CPP_KEYWORD ((cpp_ttype) (N_TTYPES + 1))
+#if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6
+# define CPP_KEYWORD ((cpp_ttype) (N_TTYPES + 1))
+#endif
class cxx_lexer
{