Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-06-01 Thread JoKern65
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-31 Thread Phil Race
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-31 Thread JoKern65
On Tue, 30 May 2023 21:44:17 GMT, JoKern65 wrote: >> src/hotspot/share/runtime/javaThread.cpp line 115: >> >>> 113: #include >>> 114: #endif >>> 115: >> >> Could these conditionals be included in globalDefinitions_xlc.hpp instead? > > In principle the `#include ` could be included in >

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-30 Thread JoKern65
On Tue, 30 May 2023 18:42:54 GMT, Coleen Phillimore wrote: >> JoKern65 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> forgotton _ > > src/hotspot/share/runtime/javaThread.cpp line 115: > >> 113: #include >> 114: #endif >> 115: > >

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-30 Thread Coleen Phillimore
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-30 Thread Kim Barrett
On Sat, 27 May 2023 15:33:37 GMT, Kim Barrett wrote: >> I am basically worried that undefining malloc, even if it seems harmless >> now, exposes us to difficult-to-investigate problems down the road, since it >> depends on how the libc devs will reform those macros in the future. I would >>

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-27 Thread Kim Barrett
On Sat, 27 May 2023 11:50:11 GMT, Thomas Stuefe wrote: >>> This one is not just to get rid of a warning. We get real test errors >>> because malloc gets replaced by vec_malloc in log tags. >> >> That does not invalidate my argument, nor does it answer my question. Those >> test errors could

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-27 Thread Thomas Stuefe
On Sat, 27 May 2023 11:25:41 GMT, Thomas Stuefe wrote: >> This one is not just to get rid of a warning. We get real test errors >> because malloc gets replaced by vec_malloc in log tags. > >> This one is not just to get rid of a warning. We get real test errors >> because malloc gets replaced

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-27 Thread Thomas Stuefe
On Fri, 26 May 2023 20:27:12 GMT, Martin Doerr wrote: > This one is not just to get rid of a warning. We get real test errors because > malloc gets replaced by vec_malloc in log tags. That does not invalidate my argument, nor does it answer my question. Those test errors could be also fixed

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Martin Doerr
On Fri, 26 May 2023 16:58:41 GMT, Thomas Stuefe wrote: >> The crazy thing is that `malloc` is defined! That means all places where we >> use the term malloc are getting replaced without such a workaround. (E.g. >> for log tags.) > > So, we do this only for malloc? Not for calloc,

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Thomas Stuefe
On Thu, 25 May 2023 18:18:43 GMT, Martin Doerr wrote: >> src/hotspot/share/utilities/globalDefinitions_xlc.hpp line 47: >> >>> 45: #undef malloc >>> 46: extern void *malloc(size_t) asm("vec_malloc"); >>> 47: #endif >> >> Wow! And I don't mean that in a good way. I'm not questioning

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Martin Doerr
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread JoKern65
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Matthias Baesken
On Fri, 26 May 2023 10:18:37 GMT, JoKern65 wrote: > Here are the reasons for the disabled warnings in > make/modules/java.base/lib/CoreLibraries.gmk > DISABLED_WARNINGS_clang_aix_ProcessHandleImpl_unix.c := sign-compare, > DISABLED_WARNINGS_clang_aix := gnu-pointer-arith,

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Matthias Baesken
On Fri, 26 May 2023 10:18:37 GMT, JoKern65 wrote: > src/java.base/share/native/libjli/java.c:2311:22: error: format string is not > a string literal [-Werror,-Wformat-nonliteral] vfprintf(stderr, fmt, vl); ^~~ We disable this warning too for clang on all platforms in BUILD_LIBJLI (

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread JoKern65
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread JoKern65
> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk > on AIX , we run into various "warnings as errors". > Some of those are in shared codebase and could be addressed by small > adjustments. > A lot of those changes are in hotspot, some might be somewhere else in the