public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Avoid illegal argument to verbose in dg-test callback
@ 2020-04-16 13:21 Matthias Kretz
  2020-04-20 14:30 ` Jonathan Wakely
  2021-08-17 19:14 ` Thomas Schwinge
  0 siblings, 2 replies; 4+ messages in thread
From: Matthias Kretz @ 2020-04-16 13:21 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

If extra_tool_flags starts with a dash, an error like 'ERROR: verbose:
illegal argument: -march=native -O2 -std=c++17' is printed. This is
easily fixed by inserting a double dash before the variable.

        * testsuite/lib/libstdc++.exp: Avoid illegal argument to
        verbose.
---
 libstdc++-v3/testsuite/lib/libstdc++.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/
testsuite/lib/libstdc++.exp
index 10a7e748464..7f4532c55b2 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -408,7 +408,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } {
     set options ""
     if { $extra_tool_flags != "" } {
 	verbose -log "extra_tool_flags are:"
-	verbose -log $extra_tool_flags
+	verbose -log -- $extra_tool_flags
 	if { [string first "-x c" $extra_tool_flags ] != -1 } {
 	    verbose -log "compiling and executing as C, not C++"
 	    set edit_tool_flags $extra_tool_flags
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-17 19:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 13:21 [PATCH] Avoid illegal argument to verbose in dg-test callback Matthias Kretz
2020-04-20 14:30 ` Jonathan Wakely
2021-08-17 19:14 ` Thomas Schwinge
2021-08-17 19:23   ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).