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 |
|
@fthevenet This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 15 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@gnu-andrew) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
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 |
|
/reviewer 1 reviewer Not sure why this is being marked |
|
@gnu-andrew Only the author (@fthevenet) is allowed to issue the |
|
/reviewers 1 reviewer |
|
@gnu-andrew |
gnu-andrew
left a comment
There was a problem hiding this comment.
Patch looks good to me. There's no need to backport a change that just touched the same copyright header and especially not a cleanup one.
Despite the subject, I don't believe this is related to C23, as 17u should be passing -std=c99. It's likely just additional warnings with a newer gcc.
|
Thanks for the review, @gnu-andrew |
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
Reviewers
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