RFR: 8263028: Windows build fails due to several treat-warning-as-errors
Yi Yang
yyang at openjdk.java.net
Sun Mar 21 04:30:53 UTC 2021
cl.exe(19.28.29334) can not build JDK on windows_x64 because it treats many warnings as errors thus prohibiting further compilation. (See detailed failure logs on JBS)
1. methodMatcher.cpp
cl.exe can not handle advanced usage of sscanf(i.e. regex-like sscanf) correctly. This looks like an msvc compiler bug, it has been there for a long while, so I temporarily disable these warnings in a limited region. Outside of this region, the compiler still treats them as errors. This change does not affect the functionality of MethodMatcher::parse_method_pattern, it can parse class name and method name in a desired manner.
2. vm_version_x86.cpp
Some comments contain characters(Register Trademark) that cannot be represented in the current code page (936). Replacing them with ASCII-characters makes the compiler happy.
Test manually!
Best Regards,
Yang
-------------
Commit messages:
- fix build failure on windows
Changes: https://git.openjdk.java.net/jdk/pull/3107/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3107&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8263028
Stats: 41 lines in 2 files changed: 5 ins; 0 del; 36 mod
Patch: https://git.openjdk.java.net/jdk/pull/3107.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3107/head:pull/3107
PR: https://git.openjdk.java.net/jdk/pull/3107
More information about the hotspot-dev
mailing list