maintainer-feedback requested: [Bug 280560] java/openjdk11: fix build with clang 19
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 280560] java/openjdk11: fix build with clang 19"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Aug 2024 16:08:31 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-java (Nobody)
<java@FreeBSD.org> for maintainer-feedback:
Bug 280560: java/openjdk11: fix build with clang 19
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280560
--- Description ---
Clang 19 is now more strict about undefined integral expressions used as
constants in enum, which results in errors compiling java/openjdk11,
similar to:
/wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.24-8-1/src/jdk.pack/shar
e/native/common-unpack/constants.h:206:33:
error: expression is not an integral constant expression
206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved
for future use.
| ^~~~~~~~
/wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.24-8-1/src/jdk.pack/shar
e/native/common-unpack/constants.h:206:37:
note: left shift of negative value -1
206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved
for future use.
| ^
Replace the negative value with ~0u to fix this error.