Created
February 11, 2018 20:18
-
-
Save knight-of-ni/17a2c221ec10bdc937cc8b213e05c951 to your computer and use it in GitHub Desktop.
patch to allow odb compiler to work with a project that uses boost libraries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From ec777147024fde72e4411cc6b1e1e49f4a1d1804 Mon Sep 17 00:00:00 2001 | |
From: Boris Kolpackov <boris@codesynthesis.com> | |
Date: Fri, 23 Dec 2016 10:18:01 +0200 | |
Subject: [PATCH] Fix bug in GCC 6 input_location translation | |
--- | |
odb/cxx-lexer.cxx | 8 ++++++++ | |
1 file changed, 8 insertions(+) | |
diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx | |
index 64df296..ae045d9 100644 | |
--- a/odb/cxx-lexer.cxx | |
+++ b/odb/cxx-lexer.cxx | |
@@ -106,7 +106,15 @@ next (string& token, tree* node) | |
location_t cxx_pragma_lexer:: | |
location () const | |
{ | |
+ // Starting from GCC 6 the input location seem to require the same | |
+ // translation as what we do in real_source_location(). | |
+ // | |
+#if BUILDING_GCC_MAJOR >= 6 | |
+ return linemap_resolve_location ( | |
+ line_table, input_location, LRK_MACRO_EXPANSION_POINT, 0); | |
+#else | |
return input_location; | |
+#endif | |
} | |
string cxx_pragma_lexer:: | |
-- | |
1.7.10.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment