Hi, While working on freestanding libstdc++, we came up with the idea to use a special error message to detect tests that use headers that don't work in freestanding, and mark them as unsupported by emitting ::unsupported:: from libstdc++-dg-test. However, in combination with dg-warn and dg-error, this does not behave as intended: the errors those expect will not be emitted, and extra errors will be emitted, hence files that should be UNSUPPORTED are counted as FAILs (test for excess errors/test for errors, line NN) as well as UNSUPPORTED.
I have a workaround for this issue:
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/
testsuite/lib/libstdc++.exp
index f9a165c3d61..526f0fbab73 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -428,6 +428,10 @@ proc libstdc++-dg-test { prog do_what
extra_tool_flags } {
set unsupported_message [libstdc++_check_unsupported_p
$comp_output]
if { $unsupported_message != "" } {
+ upvar dg-messages messages
+ upvar dg-excess-errors-flag excess-errors-flag
+ set messages [list]
+ set excess-errors-flag 1
set comp_output "::unsupported::$unsupported_message"
}
... however, it feels prone to breakage (since it depends on how dg-test
is implemented).
Is there a better way to solve this?
Thanks in advance, and have a most wonderful day,
--
Arsen Arsenović
signature.asc
Description: This is a digitally signed message part.
