summaryrefslogtreecommitdiff
path: root/odb/cxx-lexer.hxx
diff options
context:
space:
mode:
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
{