aboutsummaryrefslogtreecommitdiff
path: root/odb/pragma.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-28 11:01:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-28 11:01:06 +0200
commit1f87ed70f983bc0fb920a0e1360de0977fe10c9f (patch)
tree27a46e525d178b08ed6d0de66dace9368275ef2c /odb/pragma.cxx
parentec777147024fde72e4411cc6b1e1e49f4a1d1804 (diff)
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.
Diffstat (limited to 'odb/pragma.cxx')
-rw-r--r--odb/pragma.cxx8
1 files changed, 4 insertions, 4 deletions
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;
}