1From 029687831099bf1dcc944517f9e48af1db5b0361 Mon Sep 17 00:00:00 2001 2From: Boris Kolpackov <boris@codesynthesis.com> 3Date: Fri, 23 Dec 2016 10:18:01 +0200 4Subject: [PATCH] Fix bug in GCC 6 input_location translation 5 6[Upstream: ec777147024fde72e4411cc6b1e1e49f4a1d1804] 7Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com> 8--- 9 odb/cxx-lexer.cxx | 8 ++++++++ 10 1 file changed, 8 insertions(+) 11 12diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx 13index 64df296..ae045d9 100644 14--- a/odb/cxx-lexer.cxx 15+++ b/odb/cxx-lexer.cxx 16@@ -106,7 +106,15 @@ next (string& token, tree* node) 17 location_t cxx_pragma_lexer:: 18 location () const 19 { 20+ // Starting from GCC 6 the input location seem to require the same 21+ // translation as what we do in real_source_location(). 22+ // 23+#if BUILDING_GCC_MAJOR >= 6 24+ return linemap_resolve_location ( 25+ line_table, input_location, LRK_MACRO_EXPANSION_POINT, 0); 26+#else 27 return input_location; 28+#endif 29 } 30 31 string cxx_pragma_lexer:: 32-- 332.25.0 34 35