From 5773833af8d8644bb59e664fe068c93b825974e3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 12 Jun 2023 05:51:26 +0200 Subject: Hack around GCC 13 -Wdangling-reference false positives See GCC bugs 107532, 110213. --- libbuild2/adhoc-rule-buildscript.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libbuild2/adhoc-rule-buildscript.cxx') 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 (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 */)); } -- cgit v1.1