This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed: handle negative numbers in gcc-gdb-test.exp


Without this, I got weird ERRORs and those Tcl backtraces you come
to hate, instead of the expected FAILs.  Committed as obvious after
running a failing guality test and obvserving the intended change.
(Well ok, *adding an explanatory comment* is apparently not obvious,
but I'll take that liberty...)

testsuite:
	* lib/gcc-gdb-test.exp (gdb-test): Pass -- as first argument
	to to send_log.

Index: gcc/testsuite/lib/gcc-gdb-test.exp
===================================================================
--- gcc/testsuite/lib/gcc-gdb-test.exp	(revision 192677)
+++ gcc/testsuite/lib/gcc-gdb-test.exp	(working copy)
@@ -74,7 +74,9 @@ proc gdb-test { args } {
 	    if { $first == $second } {
 		pass "$testname"
 	    } else {
-		send_log "$first != $second\n"
+		# We need the -- to disambiguate $first from an option,
+		# as it may be negative.
+		send_log -- "$first != $second\n"
 		fail "$testname"
 	    }
 	    remote_close target

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]