[Bug testsuite/105959] new test case c-c++-common/diagnostic-format-sarif-file-4.c from r13-967-g6cf276ddf22066 fails
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 17 15:35:26 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105959
--- Comment #12 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for the ideas. If I hack in the following into dg-scan (to force the
scanned file to be treated as UTF-8 as it is read), then the existing case
works with both:
LC_ALL=C
LC_ALL=en_US.UTF-8
so perhaps I can do this just for scan-sarif-file
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 4b018abcf3d..828002bf6e1 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -59,6 +59,7 @@ proc dg-scan { name positive testcase output_file orig_args }
{
return
}
set fd [open $output_file r]
+ fconfigure $fd -encoding utf-8
set text [read $fd]
close $fd
More information about the Gcc-bugs
mailing list