RFR: 8312190: Fix c++11-narrowing warnings in hotspot code

Coleen Phillimore coleenp at openjdk.org
Fri Jul 28 12:14:56 UTC 2023


On Wed, 19 Jul 2023 07:49:08 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> This patch fixes compilation warnings produced by Clang when compiling on Windows.
>> 
>> Clang emulates MSVC behavior and uses `int` for enumeration types that do not explicitly specify the underlying type. This patch sets an explicit underlying type for 3 enumerations to fix the warnings.
>> 
>> See Microsoft's documentation of [Zc:enumTypes](https://learn.microsoft.com/en-us/cpp/build/reference/zc-enumtypes?view=msvc-170) for more information.
>
> Mach5 came back clean. Thanks for the reviews!

@djelinski Please review PR https://github.com/openjdk/jdk/pull/15056 and/or test with your compiler, please.

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

PR Comment: https://git.openjdk.org/jdk/pull/14907#issuecomment-1655578024


More information about the hotspot-dev mailing list