aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/adhoc-rule-buildscript.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-06-12 05:51:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-06-12 05:51:26 +0200
commit5773833af8d8644bb59e664fe068c93b825974e3 (patch)
tree727b5ed1d39b1ef5fb021395dcc3330dedb7bd0d /libbuild2/adhoc-rule-buildscript.cxx
parentc027dfcdfccd1e5f581649ebf176b091081fa21d (diff)
Hack around GCC 13 -Wdangling-reference false positives
See GCC bugs 107532, 110213.
Diffstat (limited to 'libbuild2/adhoc-rule-buildscript.cxx')
-rw-r--r--libbuild2/adhoc-rule-buildscript.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/adhoc-rule-buildscript.cxx b/libbuild2/adhoc-rule-buildscript.cxx
index a67b07b..61a9e21 100644
--- a/libbuild2/adhoc-rule-buildscript.cxx
+++ b/libbuild2/adhoc-rule-buildscript.cxx
@@ -718,10 +718,11 @@ namespace build2
//
for (dir_path& d: p.second)
{
+ dir_path o; string n; // For GCC 13 -Wdangling-reference.
const fsdir& dt (search<fsdir> (t,
move (d),
- dir_path (),
- string (), nullptr, nullptr));
+ move (o),
+ move (n), nullptr, nullptr));
match_sync (a, dt);
pts.push_back (prerequisite_target (&dt, true /* adhoc */));
}