From 1f87ed70f983bc0fb920a0e1360de0977fe10c9f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 28 Dec 2016 11:01:06 +0200 Subject: Fix GCC 6 issue with PRAGMA_DB macro In GCC 6 we use the position of the macro expansion, not the position inside the macro itself. This means that multiple pragmas inside PRAGMA_DB will all have the same position which we were not handling properly. --- odb/pragma.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'odb/pragma.cxx') diff --git a/odb/pragma.cxx b/odb/pragma.cxx index 0c925ca..62d97b4 100644 --- a/odb/pragma.cxx +++ b/odb/pragma.cxx @@ -4391,23 +4391,23 @@ post_process_pragmas () for (pragma_set::iterator j (i->second.begin ()), e (i->second.end ()); j != e; ++j) { - string const& name (j->context_name); + string const& name (j->second.context_name); if (name == "object") { - p = &*j; + p = &j->second; diag_name = "persistent object"; break; } else if (name == "view") { - p = &*j; + p = &j->second; diag_name = "view"; break; } else if (name == "value") { - p = &*j; + p = &j->second; diag_name = "composite value"; break; } -- cgit v1.1