RFR: 8303764: Enable -Zc:wchar_t for Visual C++ [v5]

Julian Waters jwaters at openjdk.org
Sat Mar 11 15:10:09 UTC 2023


> Was: sunmscapi.dll cannot compile with Visual C++
> 
> `-Zc:wchar_t-` has, until now, been passed to switch off wchar_t as a distinct C++ type when compiling with Visual C++ so jchar and wchar_t are typedef'd to shorts on Windows. After some examination it appears this flag is not actually needed for almost every source file that we have, barring security.cpp, so we could try to remove it and make Windows code behave more like regular C++, since casting between wchar_t and jchar does not appear to happen very often (only appearing in one file!). wchar_t in Standard C is a typedef and is never affected by this flag, and if `-Zc:wchar_t` is enabled for C code, it is simply ignored

Julian Waters has updated the pull request incrementally with one additional commit since the last revision:

  AccessBridgeJavaEntryPoints.cpp

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/12907/files
  - new: https://git.openjdk.org/jdk/pull/12907/files/2c3f65cd..f082db28

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=12907&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12907&range=03-04

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/12907.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12907/head:pull/12907

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



More information about the security-dev mailing list