aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-23 10:18:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-23 10:18:01 +0200
commitec777147024fde72e4411cc6b1e1e49f4a1d1804 (patch)
treebe9ae05f2dadf8a9b16219cb22d07a82ee755334 /odb
parent38d43cba0d34dfc1a368d0c700b0f647dd7c9a2c (diff)
Fix bug in GCC 6 input_location translation
Diffstat (limited to 'odb')
-rw-r--r--odb/cxx-lexer.cxx8
1 files changed, 8 insertions, 0 deletions
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::