8378180: Compiling OpenJDK with C23 C-Compiler gives warning: initialization discards ‘const’ qualifier from pointer target type#3231
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. |
Webrevs
|
|
Builds in RHEL-8 / gcc 8.5.0 and Fedora 43/ gcc 15.2.1 run fine. |
|
Thanks for testing this @vieiro |
|
|
|
Thanks for the review @tstuefe |
|
/approval request I'd like to backport this to JDK 11. Motivation: This patch is needed in order to build jdk11u with more recent version of gcc (16.1.1+), as it fixes compiler warnings. The patch does not appy cleanly; the following modifications are necessary:
The change introduces no behaviour change and is low risk. I have verified that with this patch, jdk11u-dev compiles without warning on Fedora 44 with gcc 16.1.1. |
|
@fthevenet |
gnu-andrew
left a comment
There was a problem hiding this comment.
- Copyright header adjustments look fine.
- No issue dropping
LinuxPackage.cchanges socketTransport.cchanges were part of a enhancement with CSR in 13, JDK-8223104: "JDWP support for IPv6", so ok just bringing that one line change over.- The need for the
NetworkInterface.cchange is JDK-8254871: "Remove unnecessary string copy in NetworkInterface.c" which looks a small enough change to backport as a pre-requisite of this. This change both removes a redundant string copy and the need to reassign tocolonP.
The change is small enough that you could add it as an extra commit here followed by the missing part of 8254871. Just make sure to credit the additional issue with /issue add if you go that route.
|
/issue add JDK-8254871 |
|
@fthevenet |
|
Thanks for the review @gnu-andrew |
|
/approval JDK-8254871 request I'd like to backport this to JDK 11. The main motivation for this patch is as a prerequisite for backporting JDK-8378180 The patch applies cleanly. |
|
@fthevenet |
gnu-andrew
left a comment
There was a problem hiding this comment.
Thanks for backporting the additional fix. I confirmed the new commit is 8254871 + the missing changes from 8378180.
This is an unclean backport of of commit 16971af1 from the openjdk/jdk17u-dev 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 patch does not appy cleanly; the following modifications were necessary:
src/jdk.jpackage/linux/native/applauncher/LinuxPackage.cas the file doesn't exists in jdk11The changes in(EDIT: This PR also includes a backport of JDK-8254871, making the changes tosrc/java.base/unix/native/libnet/NetworkInterface.care not applicaple to jdk11 (*colonPis assigned a value at line 251, cannot be declaredconst)src/java.base/unix/native/libnet/NetworkInterface.crelevant)discarded-qualifierswarning insrc/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.cI have verified that with this patch, jdk11u-dev compiles without warning on Fedora 44 with gcc 16.1.1.
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/3231/head:pull/3231$ git checkout pull/3231Update a local copy of the PR:
$ git checkout pull/3231$ git pull https://git.openjdk.org/jdk11u-dev.git pull/3231/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3231View PR using the GUI difftool:
$ git pr show -t 3231Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/3231.diff
Using Webrev
Link to Webrev Comment