On 1/15/19 10:50 AM, Tom Honermann wrote:
On 1/15/19 1:51 AM, Christophe Lyon wrote:
On Mon, 14 Jan 2019 at 20:59, Jason Merrill <ja...@redhat.com> wrote:
On 12/23/18 9:27 PM, Tom Honermann wrote:
Attached is a revised patch that addresses changes in P0482R6 as
well as
feedback provided by Jason. Changes from the prior patch include:
- Updated the value of the __cpp_char8_t feature test macro to 201811
per P0482R6.
- Enable char8_t support with -std=c++2a per adoption of P0482R6 in
San Diego.
- Reverted the unnecessary changes to gcc/gcc/c/c-typeck.c as requested
by Jason.
- Removed unnecessary checks of 'flag_char8_t' within the C++ front
end as requested by Jason.
- Corrected the regression spotted by Jason regarding initialization of
signed char and unsigned char arrays with string literals.
- Made minor changes to the error message emitted for ill-formed
initialization of char arrays with UTF-8 string literals. These
changes do not yet implement Jason's suggestion; I'll follow up
with a
separate patch for that due to additional test impact.
Tested on x86_64-linux.
I just applied the compiler changes with small modifications, as
follows; thank you very much for the patches. Jonathan should check in
the library portion before long.
Jason
Hi,
The new testcase g++.dg/ext/utf-cvt-char8_t.C fails at least on arm
and aarch64:
g++.dg/ext/utf-cvt-char8_t.C -std=gnu++14 (test for warnings, line 24)
g++.dg/ext/utf-cvt-char8_t.C -std=gnu++17 (test for warnings, line 24)
Arm and aarch64 have unsigned char by default, so the warning
("conversion to 'char' from 'char8_t' may change the sign of the
result") isn't emitted on those platforms. I presume adding
'-fsigned-char' to the options for the test would be a sufficient fix?
If so, a patch is attached.
Applied, thanks.
Jason