summaryrefslogtreecommitdiff
path: root/odb/processor.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-07 14:58:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-07 14:58:43 +0200
commit356630ced28f3101e8e2d88e3c52f8d3008515c7 (patch)
tree6950cfd3797bbe34e375c223e4226666fef69202 /odb/processor.cxx
parentbc1616e3e45967ccec892d14a9337554238ca332 (diff)
Adapt to changes in GCC 8
Diffstat (limited to 'odb/processor.cxx')
-rw-r--r--odb/processor.cxx30
1 files changed, 22 insertions, 8 deletions
diff --git a/odb/processor.cxx b/odb/processor.cxx
index 7c396e7..0a6d753 100644
--- a/odb/processor.cxx
+++ b/odb/processor.cxx
@@ -444,12 +444,17 @@ namespace
// OVL_* macros work for both FUNCTION_DECL and OVERLOAD.
//
- for (tree o (BASELINK_FUNCTIONS (decl));
- o != 0;
- o = OVL_NEXT (o))
+#if BUILDING_GCC_MAJOR >= 8
+ for (ovl_iterator i (BASELINK_FUNCTIONS (decl)); i; ++i)
+#else
+ for (tree o (BASELINK_FUNCTIONS (decl)); o != 0; o = OVL_NEXT (o))
+#endif
{
+#if BUILDING_GCC_MAJOR >= 8
+ tree f (*i);
+#else
tree f (OVL_CURRENT (o));
-
+#endif
// We are only interested in public non-static member
// functions. Note that TREE_PUBLIC() returns something
// other than what we need.
@@ -551,12 +556,17 @@ namespace
{
// OVL_* macros work for both FUNCTION_DECL and OVERLOAD.
//
- for (tree o (BASELINK_FUNCTIONS (decl));
- o != 0;
- o = OVL_NEXT (o))
+#if BUILDING_GCC_MAJOR >= 8
+ for (ovl_iterator i (BASELINK_FUNCTIONS (decl)); i; ++i)
+#else
+ for (tree o (BASELINK_FUNCTIONS (decl)); o != 0; o = OVL_NEXT (o))
+#endif
{
+#if BUILDING_GCC_MAJOR >= 8
+ tree f (*i);
+#else
tree f (OVL_CURRENT (o));
-
+#endif
// We are only interested in non-static member functions.
//
if (!DECL_NONSTATIC_MEMBER_FUNCTION_P (f))
@@ -2880,7 +2890,11 @@ namespace
{
tree prev (CP_DECL_CONTEXT (scope));
+#if BUILDING_GCC_MAJOR >= 8
+ if (!is_nested_namespace (prev, scope, true))
+#else
if (!is_associated_namespace (prev, scope))
+#endif
break;
scope = prev;