RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v2]
Aleksey Shipilev
shade at openjdk.org
Mon Aug 1 14:50:48 UTC 2022
> See bug report for reproducer and error message. The warning looks quite superficial, and I initially suspected that it complains about `int len = (int)strlen(str)` cast of `size_t`. But what is confusing is nearly the similar code in `newStringCp1252` apparently does not produce the warning: https://github.com/openjdk/jdk/blob/f5d1b5bda27c798347ae278cbf69725ed4be895c/src/java.base/share/native/libjava/jni_util.c#L533-L566
>
> I propose we chalk it up to false/odd compiler warning and sync up unproblematic `newStringCp1252` and `newString646_US` implementation to dodge it.
>
> Additional testing:
> - [x] Linux x86_32 build with GCC 11
> - [x] Linux x86_32 `tier1` test with GCC 9
> - [ ] Linux x86_64 `tier1` test with GCC 9
Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
Init buf in newStringCp1252
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/9702/files
- new: https://git.openjdk.org/jdk/pull/9702/files/82ff99b3..adcbf91c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=9702&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=9702&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/9702.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9702/head:pull/9702
PR: https://git.openjdk.org/jdk/pull/9702
More information about the core-libs-dev
mailing list