Closed Bug 1849070 Opened 11 months ago Closed 11 months ago

js/src/builtin/intl/Locale.cpp:204:20: warning: 'char_traits<unsigned char>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 1

Categories

(Core :: JavaScript: Internationalization API, defect)

defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

This shows up in wasi-intl builds, as well as mingw builds (because they all use libc++ from clang):

[task 2023-08-17T00:56:42.333Z] In file included from Unified_cpp_js_src5.cpp:11:
[task 2023-08-17T00:56:42.334Z] /builds/worker/checkouts/gecko/js/src/builtin/intl/Locale.cpp:204:20: warning: 'char_traits<unsigned char>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it. [-Wdeprecated-declarations]
[task 2023-08-17T00:56:42.334Z]       iter_ = std::char_traits<CharT>::find(
[task 2023-08-17T00:56:42.334Z]                    ^
[task 2023-08-17T00:56:42.334Z] /builds/worker/checkouts/gecko/js/src/builtin/intl/Locale.cpp:765:21: note: in instantiation of member function 'SepKeywordIterator<unsigned char>::next' requested here
[task 2023-08-17T00:56:42.334Z]     beginKey = iter.next();
[task 2023-08-17T00:56:42.334Z]                     ^
[task 2023-08-17T00:56:42.334Z] /builds/worker/checkouts/gecko/js/src/builtin/intl/Locale.cpp:804:16: note: in instantiation of function template specialization 'FindUnicodeExtensionType<unsigned char>' requested here
[task 2023-08-17T00:56:42.334Z]              ? FindUnicodeExtensionType(unicodeExtension->latin1Chars(nogc),
[task 2023-08-17T00:56:42.334Z]                ^
[task 2023-08-17T00:56:42.334Z] /builds/worker/fetches/sysroot-wasm32-wasi/include/c++/v1/__string/char_traits.h:79:8: note: 'char_traits<unsigned char>' has been explicitly marked deprecated here
[task 2023-08-17T00:56:42.334Z] struct _LIBCPP_DEPRECATED_("char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it.")
[task 2023-08-17T00:56:42.334Z]        ^
[task 2023-08-17T00:56:42.334Z] /builds/worker/fetches/sysroot-wasm32-wasi/include/c++/v1/__config:782:53: note: expanded from macro '_LIBCPP_DEPRECATED_'
[task 2023-08-17T00:56:42.334Z] #      define _LIBCPP_DEPRECATED_(m) __attribute__((deprecated(m)))
[task 2023-08-17T00:56:42.334Z]                                                     ^
[task 2023-08-17T00:56:42.334Z] In file included from Unified_cpp_js_src5.cpp:11:
[task 2023-08-17T00:56:42.334Z] /builds/worker/checkouts/gecko/js/src/builtin/intl/Locale.cpp:863:31: warning: 'char_traits<unsigned char>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it. [-Wdeprecated-declarations]
[task 2023-08-17T00:56:42.334Z]   if (const CharT* sep = std::char_traits<CharT>::find(baseName, length, '-')) {
[task 2023-08-17T00:56:42.334Z]                               ^
[task 2023-08-17T00:56:42.334Z] /builds/worker/checkouts/gecko/js/src/builtin/intl/Locale.cpp:922:16: note: in instantiation of function template specialization 'BaseNameParts<unsigned char>' requested here
[task 2023-08-17T00:56:42.334Z]              ? BaseNameParts(baseName->latin1Chars(nogc), baseName->length())
[task 2023-08-17T00:56:42.334Z]                ^
[task 2023-08-17T00:56:42.334Z] /builds/worker/fetches/sysroot-wasm32-wasi/include/c++/v1/__string/char_traits.h:79:8: note: 'char_traits<unsigned char>' has been explicitly marked deprecated here
[task 2023-08-17T00:56:42.334Z] struct _LIBCPP_DEPRECATED_("char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it.")
[task 2023-08-17T00:56:42.334Z]        ^
[task 2023-08-17T00:56:42.334Z] /builds/worker/fetches/sysroot-wasm32-wasi/include/c++/v1/__config:782:53: note: expanded from macro '_LIBCPP_DEPRECATED_'
[task 2023-08-17T00:56:42.334Z] #      define _LIBCPP_DEPRECATED_(m) __attribute__((deprecated(m)))
[task 2023-08-17T00:56:42.334Z]                                                     ^
[task 2023-08-17T00:56:42.334Z] 2 warnings generated.

The warning turns into an error with current clang trunk.

Blocks: clang-18

It is not guaranteed to exist by the standard, and is actively being
removed from libc++ in LLVM 18.

Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/68ff4d3f7338
Avoid using char_traits<unsigned char>. r=spidermonkey-reviewers,anba
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Blocks: 1849055
See Also: 1849055
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: