aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-04-03 17:20:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-04-03 17:20:43 +0200
commitac0ac59de3b7973001b209a938080c9ec0ab9262 (patch)
treeab895ae5d94bea82e0793cdf816ab8df00d0dac0
parentb435821274779cfcd8f447955e3ef3baf84c1ab9 (diff)
Add support for GCC 4.6
-rw-r--r--odb/cxx-lexer.cxx11
-rw-r--r--odb/gcc.hxx5
2 files changed, 12 insertions, 4 deletions
diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx
index 24f1231..bcbeb49 100644
--- a/odb/cxx-lexer.cxx
+++ b/odb/cxx-lexer.cxx
@@ -28,8 +28,15 @@ char const* cxx_lexer::token_spelling[N_TTYPES + 1] = { TTYPE_TABLE "KEYWORD"};
//
extern "C" bool
cpp_error_callback (
- cpp_reader* reader, int level, location_t, unsigned int,
- char const* msg, va_list *ap)
+ cpp_reader* reader,
+ int level,
+#if BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 5
+ int /*reason*/, // Added in GCC 4.6.0.
+#endif
+ location_t,
+ unsigned int,
+ char const* msg,
+ va_list *ap)
{
char const* kind (0);
switch (level)
diff --git a/odb/gcc.hxx b/odb/gcc.hxx
index 3365c86..feb69ba 100644
--- a/odb/gcc.hxx
+++ b/odb/gcc.hxx
@@ -19,6 +19,7 @@
extern "C"
{
+#include <bversion.h>
#include <gcc-plugin.h>
#include <config.h>
@@ -30,10 +31,10 @@ extern "C"
#include <tm.h>
#include <cpplib.h>
-#include <diagnostic.h>
+#include <cp/cp-tree.h>
#include <c-common.h>
#include <c-pragma.h>
-#include <cp/cp-tree.h>
+#include <diagnostic.h>
}
#ifndef LOCATION_COLUMN