Would be good to avoid this -Wdeprecated-declarations warning in URLParser.cpp: ../../Source/WebCore/platform/URLParser.cpp: In function ‘WTF::Optional<WTF::String> WebCore::domainToASCII(const WTF::String&)’: ../../Source/WebCore/platform/URLParser.cpp:1352:193: warning: ‘int32_t uidna_IDNToASCII_56(const UChar*, int32_t, UChar*, int32_t, int32_t, UParseError*, UErrorCode*)’ is deprecated [-Wdeprecated-declarations] int32_t numCharactersConverted = uidna_IDNToASCII(StringView(domain).upconvertedCharacters(), domain.length(), hostnameBuffer, hostnameBufferLength, UIDNA_ALLOW_UNASSIGNED, nullptr, &error); ^ In file included from /usr/include/unicode/platform.h:23:0, from /usr/include/unicode/ptypes.h:50, from /usr/include/unicode/umachine.h:44, from /usr/include/unicode/utypes.h:36, from ../../Source/WTF/wtf/text/ASCIIFastPath.h:26, from ../../Source/WTF/wtf/text/WTFString.h:28, from ../../Source/WebCore/platform/text/TextCodec.h:33, from ../../Source/WebCore/platform/text/TextEncoding.h:29, from ../../Source/WebCore/platform/URLParser.h:28, from ../../Source/WebCore/platform/URLParser.cpp:27: /usr/include/unicode/uidna.h:673:1: note: declared here uidna_IDNToASCII( const UChar* src, int32_t srcLength, ^
The header says: @deprecated ICU 55 Use UTS #46 instead via uidna_openUTS46() or class IDNA.
I wondered why we had those #pragma GCC diagnostic ignored "-Wdeprecated-declarations" in URL.cpp. The copy of the ICU headers we use on Cocoa platforms hasn't deprecated that yet. I think a better solution would be to just use uidna_openUTS46 / uidna_close instead.
Upgrading the version of standard that we use is definitely better. Bug 144194 has some open questions about that.
I'd like a quick fix for the warning, and I doubt upgrading the standard is going to be it. So if switching to uidna_openUTS46/uidna_close is not easy (I have no idea) then I will just add pragmas there, OK?
Yes.
Adding pragmas with "// FIXME: This should use uidna_openUTS46 / uidna_close instead" would be fine for now.
Created attachment 289156 [details] Patch
http://trac.webkit.org/changeset/206169