Integrated: 8286262: Windows: Cleanup deprecation warning suppression
Kim Barrett
kbarrett at openjdk.java.net
Mon May 23 22:50:47 UTC 2022
On Sun, 15 May 2022 20:50:25 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> 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
This pull request has now been integrated.
Changeset: 782ae380
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/782ae3801c63945ed977782fe15e8e911f7f9656
Stats: 21 lines in 4 files changed: 2 ins; 13 del; 6 mod
8286262: Windows: Cleanup deprecation warning suppression
Reviewed-by: ihse, dholmes
-------------
PR: https://git.openjdk.java.net/jdk/pull/8718
More information about the build-dev
mailing list