summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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