Date: Thu, 01 Aug 2024 16:07:18 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 280559] java/openjdk8: fix build with clang 19 Message-ID: <bug-280559-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280559 Bug ID: 280559 Summary: java/openjdk8: fix build with clang 19 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: java@FreeBSD.org Reporter: dim@FreeBSD.org Assignee: java@FreeBSD.org Flags: maintainer-feedback?(java@FreeBSD.org) Clang 19 is now more strict about undefined integral expressions used as constants in enum, which results in errors compiling java/openjdk8, similar to: =20=20=20 /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/shar= e/vm/oops/cpCache.hpp:195:34: error: expression is not an integral constant expression 195 | option_bits_mask =3D ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask)) |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20=20=20 /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/shar= e/vm/oops/cpCache.hpp:195:42: note: left shift of negative value -1 195 | option_bits_mask =3D ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask)) | ^ =20=20=20 /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/shar= e/vm/code/dependencies.hpp:173:27: error: expression is not an integral constant expression 173 | all_types =3D ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE), |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20=20=20 /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/shar= e/vm/code/dependencies.hpp:173:59: note: left shift of negative value -1 173 | all_types =3D ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE), | ^ In file included from /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/jdk/src/share/na= tive/com/sun/java/util/jar/pack/bands.cpp:43: =20=20=20 /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/jdk/src/share/na= tive/com/sun/java/util/jar/pack/constants.h:226:33: error: expression is not an integral constant expression 226 | AO_UNUSED_MBZ =3D (-1)<<13, // options bits res= erved for future use. | ^~~~~~~~ =20=20=20 /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/jdk/src/share/na= tive/com/sun/java/util/jar/pack/constants.h:226:37: note: left shift of negative value -1 226 | AO_UNUSED_MBZ =3D (-1)<<13, // options bits res= erved for future use. | ^ In openjdk11 and later, the (-1) constants have been replaced by the unsigned variant (~0u), which fixes these errors. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280559-7788>