RFR: 8301820: C4819 warnings were reported on Windows

Yasumasa Suenaga ysuenaga at openjdk.org
Sun Feb 5 00:42:52 UTC 2023


On Sat, 4 Feb 2023 09:42:57 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

> C4819 warnings were reported when I tried to build JDK on Windows with VS2022.
> This PR contains changes both HotSpot and client libraries. Let me know if they should be separated.
> 
> * HotSpot
>     * stubGenerator_x86_64_poly.cpp
>     * elfFile.hpp
> * libfontmanager
>     * hb.hh
> * libfreetype
>     * afblue.c
> 
> I added C4819 to `DISABLED_WARNINGS_microsoft` for libfontmanager and for libfreetype because they are 3rd-party libraries.

I uses 17.3.6 (VS Community) on Windows 11 Pro (Japanese locale (CP932))

I saw following message on the console (It is Japanese, sorry...)


d:\github-forked\jdk\src\hotspot\cpu\x86\stubGenerator_x86_64_poly.cpp(1): error C2220: 次の警告はエラーとして処理されます
d:\github-forked\jdk\src\hotspot\cpu\x86\stubGenerator_x86_64_poly.cpp(1): warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください。


In case of stubGenerator_x86_64_poly.cpp , `×` in comments cannot be handled in cl.exe. I confirmed that this character cannot be handled `iconv -f CP932 -t UTF8`, so I replaced it to `x` (alphabet).

-------------

PR: https://git.openjdk.org/jdk/pull/12427



More information about the client-libs-dev mailing list