aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/script
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-04-21 10:16:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-04-21 10:16:53 +0200
commit7bbbe76637ae5b9733c608c596f1468dd5e27a06 (patch)
tree27f462311b222f926aad2efd08357944b66adc0e /libbuild2/script
parentd882a627e0c1c90f49a2a1f69273aafc5ebfb520 (diff)
Work around bogus -Wrestrict in GCC 12 (GCC bug #105329)
Diffstat (limited to 'libbuild2/script')
-rw-r--r--libbuild2/script/run.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/libbuild2/script/run.cxx b/libbuild2/script/run.cxx
index fa6067e..8b609f1 100644
--- a/libbuild2/script/run.cxx
+++ b/libbuild2/script/run.cxx
@@ -1429,7 +1429,10 @@ namespace build2
// number (start from one) in the script.
//
if (li > 0)
- p += "-" + to_string (li);
+ {
+ p += '-';
+ p += to_string (li);
+ }
// 0 if belongs to a single-command expression, otherwise is the
// command number (start from one) in the expression.
@@ -1439,7 +1442,10 @@ namespace build2
// script. These cases are mutually exclusive and so are unambiguous.
//
if (ci > 0)
- p += "-" + to_string (ci);
+ {
+ p += '-';
+ p += to_string (ci);
+ }
return normalize (move (p), temp_dir (env), ll);
};