diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-27 15:57:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-27 16:07:03 +0200 |
commit | 6b9dbfaaf2b3dfdf3627b57c7f15c6a3cd105f35 (patch) | |
tree | bc9dae9de5b50a85dd05d2a64e13dc83c8121593 /libbuild2/cc | |
parent | 72e9ec3d7028765836851b515d80816f2da74060 (diff) |
Suppress (potential) bogus GCC 12 -Wrestrict warnings
Diffstat (limited to 'libbuild2/cc')
-rw-r--r-- | libbuild2/cc/compile-rule.cxx | 6 | ||||
-rw-r--r-- | libbuild2/cc/guess.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index 8d507e7..3a750a1 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -175,7 +175,7 @@ namespace build2 if (s == "includes") return preprocessed::includes; if (s == "modules") return preprocessed::modules; if (s == "all") return preprocessed::all; - throw invalid_argument ("invalid preprocessed value '" + s + "'"); + throw invalid_argument ("invalid preprocessed value '" + s + '\''); } // Return true if the compiler supports -isystem (GCC class) or @@ -2659,7 +2659,7 @@ namespace build2 rs = !exists ? string ("INCLUDE") : ("ERROR unable to update header '" + - (ht != nullptr ? ht->path () : f).string () + "'"); + (ht != nullptr ? ht->path () : f).string () + '\''); bad_error = true; break; @@ -2737,7 +2737,7 @@ namespace build2 } catch (const failed&) { - rs = "ERROR unable to update header unit '" + hp + "'"; + rs = "ERROR unable to update header unit '" + hp + '\''; bad_error = true; break; } diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx index 23c0b70..e851ea8 100644 --- a/libbuild2/cc/guess.cxx +++ b/libbuild2/cc/guess.cxx @@ -106,7 +106,7 @@ namespace build2 else if (id.compare (0, p, "icc" ) == 0) type = compiler_type::icc; else throw invalid_argument ( - "invalid compiler type '" + string (id, 0, p) + "'"); + "invalid compiler type '" + string (id, 0, p) + '\''); if (p != string::npos) { |