8378180: Compiling OpenJDK with C23 C-Compiler gives warning: initialization discards ‘const’ qualifier from pointer target type#4522
Conversation
|
👋 Welcome back fthevenet! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
|
|
|
/approval request I'd like to backport this to JDK 17. Motivation: This patch is needed in order to build jdk17u with more recent version of gcc (16.1.1+), as it fixes compiler warnings. The change introduces no behaviour change and is low risk. I have verified that with this patch, jdk17u-dev compiles without warning on Fedora 44 with gcc 16.1.1. |
|
@fthevenet |
This is an unclean backport of of commit 548d07d3 from the openjdk/jdk repository (itslef a backport of 76a44b3e from openjdk/jdk).
The aim for this backport is to address compiler warnings that arise when attempting to build with with more recent version of gcc (16.1+).
The backport does not apply cleanly, because I had to omit the clean-up of an used variable in
log_messages.cthat was introduced in jdk 20 as part of JDK-8289768.I opted to not do a prior backport for JDK-8289768, as it touches quite a large number of files.
I have verified that with this patch, jdk17u-dev compiles without warning on Fedora 44 with gcc 16.1.1.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/4522/head:pull/4522$ git checkout pull/4522Update a local copy of the PR:
$ git checkout pull/4522$ git pull https://git.openjdk.org/jdk17u-dev.git pull/4522/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4522View PR using the GUI difftool:
$ git pr show -t 4522Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/4522.diff
Using Webrev
Link to Webrev Comment