Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Aug 2024 16:08:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        java@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 280560] java/openjdk11: fix build with clang 19
Message-ID:  <bug-280560-8522-mGfcK5chqS@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-280560-8522@https.bugs.freebsd.org/bugzilla/>
References:  <bug-280560-8522@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
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=3D280560



--- 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:

=20=20=20
/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		  =3D (-1)<<13, // options bits reserved
for future use.
	  |				    ^~~~~~~~
=20=20=20
/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		  =3D (-1)<<13, // options bits reserved
for future use.
	  |					^

Replace the negative value with ~0u to fix this error.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280560-8522-mGfcK5chqS>