diff options
author | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-04-14 08:43:58 +0200 |
---|---|---|
committer | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-04-14 13:19:15 +0200 |
commit | c2f1dda34defe739db6016dda97a6516243372e6 (patch) | |
tree | 71b743d45ead5903556580cd0af71e25aef4ad2e | |
parent | a48f934211434cac1be951c207ee76e4b4340fac (diff) | |
download | gcc-c2f1dda34defe739db6016dda97a6516243372e6.zip gcc-c2f1dda34defe739db6016dda97a6516243372e6.tar.gz gcc-c2f1dda34defe739db6016dda97a6516243372e6.tar.bz2 |
libstdc++: Use UTF-32BE as wide encoding for big-endian machines [PR119725]
This changes the `dg-options` line so UTF-32 with byte order native to the
machine is used as wide encoding.
We still do not handle mismatch in the byte order of the Unicode encodings
(UTF32-BE on little-endian machines). This would require larger changes,
as for example `unicode-data.h` tables are encoded with native byte order.
PR libstdc++/119725
libstdc++-v3/ChangeLog:
* testsuite/std/format/debug.cc: Updated dg-options.
* testsuite/std/format/debug_nonunicode.cc: Updated dg-options.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
-rw-r--r-- | libstdc++-v3/testsuite/std/format/debug.cc | 3 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/std/format/debug_nonunicode.cc | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/std/format/debug.cc b/libstdc++-v3/testsuite/std/format/debug.cc index 07cd1e0..71bb7f4 100644 --- a/libstdc++-v3/testsuite/std/format/debug.cc +++ b/libstdc++-v3/testsuite/std/format/debug.cc @@ -1,4 +1,5 @@ -// { dg-options "-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32LE -DUNICODE_ENC" } +// { dg-options "-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32LE -DUNICODE_ENC" { target le } } +// { dg-options "-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32BE -DUNICODE_ENC" { target be } } // { dg-do run { target c++23 } } // { dg-add-options no_pch } diff --git a/libstdc++-v3/testsuite/std/format/debug_nonunicode.cc b/libstdc++-v3/testsuite/std/format/debug_nonunicode.cc index 5c03171..2ac7e75 100644 --- a/libstdc++-v3/testsuite/std/format/debug_nonunicode.cc +++ b/libstdc++-v3/testsuite/std/format/debug_nonunicode.cc @@ -1,4 +1,4 @@ -// { dg-options "-fexec-charset=ISO8859-1 -fwide-exec-charset=UTF-32LE" } +// { dg-options "-fexec-charset=ISO8859-1" } // { dg-do run { target c++23 } } // { dg-add-options no_pch } |