RFR: 8286262: Windows: Cleanup deprecation warning suppression [v2]
Kim Barrett
kbarrett at openjdk.java.net
Mon May 23 22:50:46 UTC 2022
> Please review this cleanup of deprecation warning suppression when building
> for Windows.
>
> This change consists of several parts.
>
> (1) Remove the global deprecation warning suppression when building HotSpot
> for Windows.
>
> (2) Add macro definitions requesting suppression of selected sets of
> deprecation warnings when building HotSpot for Windows.
>
> (3) Remove unnecessary forwarding macros for various POSIX functions in
> globalDefinitions_visCPP.hpp. These were provided to avoid deprecation
> warnings (that were previously also being suppressed by the global request).
> They are now covered by the new macros provided by change (2) above.
>
> An alternative to item (3) is to not define _CRT_NONSTDC_NO_DEPRECATE (in item
> (2)) and either retain the forwarding macros or define os:: wrapper functions
> for all of the affected functions. We might eventually do the latter because
> of other reasons for avoiding some of these functions, but the approach being
> taken here is simpler.
>
> For documentation of _CRT_NONSTDC_NO_DEPRECATE, see:
> https://docs.microsoft.com/en-us/cpp/c-runtime-library/compatibility
> https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996
>
> Similarly for _CRT_SECURE_NO_WARNINGS.
>
> Perhaps similarly for _WINSOCK_DEPRECATED_NO_WARNINGS (though I didn't find
> any documentation for the latter). But it might be better to not supress the
> warnings and instead use the alternatives (JDK-8286781).
>
> Testing:
> mach5 tier1
Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'master' into no-deprecate
- cleanup Windows deprecation warning suppression
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8718/files
- new: https://git.openjdk.java.net/jdk/pull/8718/files/dd39fb83..cbee140c
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8718&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8718&range=00-01
Stats: 27751 lines in 853 files changed: 14074 ins; 9711 del; 3966 mod
Patch: https://git.openjdk.java.net/jdk/pull/8718.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8718/head:pull/8718
PR: https://git.openjdk.java.net/jdk/pull/8718
More information about the hotspot-dev
mailing list