RFR: 8295146: Clean up native code with newer C/C++ language features

Julian Waters jwaters at openjdk.org
Mon Nov 14 01:38:18 UTC 2022


On Sun, 13 Nov 2022 23:07:35 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ code across the JDK can be replaced and simplified with cleaner language features that were previously not available due to required compatibility with the now unsupported Visual C++ 2017 compiler. These cleanups were highlighted by the very briefly integrated 8296115
>> 
>> No changes to the behaviour of the JDK has resulted in any way from this commit
>
> src/hotspot/share/utilities/compilerWarnings_gcc.hpp line 37:
> 
>> 35: #endif
>> 36: 
>> 37: #if defined(__clang_major__) && \
> 
> Not clear why this was moved ??

I'm not sure which one you're referring to, but the PRAGMA_DIAG_PUSH/POP was moved up to the top of the header to match compilerWarnings_visCPP.hpp, and PRAGMA_DISABLE_GCC_WARNING_AUX was moved to macros.hpp as the more general PRAGMA macro, since it's useful for all compilers and not just gcc

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

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


More information about the security-dev mailing list