[REVISED PATCH 7/9]: C++ P0482R5 char8_t: New standard library tests

Tom Honermann tom@honermann.net
Fri Feb 8 04:39:00 GMT 2019


On 2/7/19 4:54 AM, Jonathan Wakely wrote:
> On 23/12/18 21:27 -0500, Tom Honermann wrote:
>> Attached is a revised patch that addresses changes in P0482R6.  
>> Changes from the prior patch include:
>> - Updated the value of the __cpp_char8_t feature test macro to 201811.
>>
>> Tested on x86_64-linux.
>
> There are quite a few additional changes needed to make the testsuite
> pass cleanly with non-default options, e.g. when running it with
> RUNTESTFLAGS=--target_board=unix/-fchar8_t/-fno-inline I see these
> failures:
I remember thinking that I had to deal with this at one point.  It seems 
I then forgot about it.
>
> FAIL: 21_strings/basic_string/literals/types.cc (test for excess errors)
> FAIL: 21_strings/basic_string/literals/values.cc (test for excess errors)
> UNRESOLVED: 21_strings/basic_string/literals/values.cc compilation 
> failed to produce executable
> FAIL: 21_strings/basic_string_view/literals/types.cc (test for excess 
> errors)
> FAIL: 21_strings/basic_string_view/literals/values.cc (test for excess 
> errors)
> UNRESOLVED: 21_strings/basic_string_view/literals/values.cc 
> compilation failed to produce executable
> FAIL: 22_locale/codecvt/char16_t.cc (test for excess errors)
> UNRESOLVED: 22_locale/codecvt/char16_t.cc compilation failed to 
> produce executable
> FAIL: 22_locale/codecvt/char32_t.cc (test for excess errors)
> UNRESOLVED: 22_locale/codecvt/char32_t.cc compilation failed to 
> produce executable
> FAIL: 22_locale/codecvt/codecvt_utf8/79980.cc (test for excess errors)
> UNRESOLVED: 22_locale/codecvt/codecvt_utf8/79980.cc compilation failed 
> to produce executable
> FAIL: 22_locale/codecvt/codecvt_utf8/wchar_t/1.cc (test for excess 
> errors)
> UNRESOLVED: 22_locale/codecvt/codecvt_utf8/wchar_t/1.cc compilation 
> failed to produce executable
> FAIL: 22_locale/codecvt/utf8.cc (test for excess errors)
> UNRESOLVED: 22_locale/codecvt/utf8.cc compilation failed to produce 
> executable
> FAIL: 22_locale/conversions/string/2.cc (test for excess errors)
> UNRESOLVED: 22_locale/conversions/string/2.cc compilation failed to 
> produce executable
> FAIL: 22_locale/conversions/string/3.cc (test for excess errors)
> UNRESOLVED: 22_locale/conversions/string/3.cc compilation failed to 
> produce executable
> FAIL: experimental/string_view/literals/types.cc (test for excess errors)
> FAIL: experimental/string_view/literals/values.cc (test for excess 
> errors)
> UNRESOLVED: experimental/string_view/literals/values.cc compilation 
> failed to produce executable
>
> There would be similar errors running all the tests with -std=c++2a,
> which is definitely something I do often and so want the tests to be
> clean.
Absolutely, agreed.
> We can either disable those tests when char8_t is enabled
> (because we already have alternative tests checking the char8_t
> versions of string_view etc.) or make them work either way, which the
> attached patch begins doing (more changes are needed).
Since most of these tests exercise functionality that is not u8/char8_t 
specific, I think we should make them work.
>
> I expect a different set of failures for -fno-char8_t (which is
> probably a less important case to support that enabling char8_t in
> older standards, but maybe still worth testing now and then).
>
I'm not sure it is less important.  -fno-char8_t may be an important 
tool for some code bases during their initial testing of, and migration 
to, C++20.

Tom.



More information about the Gcc-patches mailing list