Hi Matthias, looks good to me. I think this makes sense for jdk14 where we only support xlclang++ on AIX. Best regards, Martin
-----Original Message----- From: build-dev <build-dev-bounces@openjdk.java.net> On Behalf Of Baesken, Matthias Sent: Montag, 22. Juli 2019 12:03 To: Baesken, Matthias <matthias.baesken@sap.com>; 'build- dev@openjdk.java.net' <build-dev@openjdk.java.net>; 'ppc-aix-port- dev@openjdk.java.net' <ppc-aix-port-dev@openjdk.java.net> Subject: RE: RFR: 8228426: xlc: switch to clang-style warning disabling
Hello, any comments please ?
From: ppc-aix-port-dev <ppc-aix-port-dev-bounces@openjdk.java.net> On Behalf Of Baesken, Matthias Sent: Freitag, 19. Juli 2019 12:20 To: 'build-dev@openjdk.java.net' <build-dev@openjdk.java.net>; 'ppc-aix- port-dev@openjdk.java.net' <ppc-aix-port-dev@openjdk.java.net> Subject: [CAUTION] RFR: 8228426: xlc: switch to clang-style warning disabling
Please review the following change that switches to clang-style warning disabling on AIX, and adjusts the warning disabling to current needs .
Recently the jdk/jdk build on AIX switched to xlc16/xlclang.
This means we can now use the standard clang-style warning disabling (the old legacy qsuppress warning disablings from legacy xlc might not fully work any more).
I think we are pretty close in reducing the compiler warnings to 0 on AIX, which would make it possible to build with warnings as errors at some point in the future .
In a first step I would disable these warnings in HS for xlc16/xlclang :
tautological-compare : (seen in os_aix.cpp)
/jdk/src/hotspot/os/aix/os_aix.cpp:2400:15: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (bytes >= Use64KPagesThreshold) { ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ /jdk/src/hotspot/os/aix/os_aix.cpp:2607:15: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (bytes >= Use64KPagesThreshold) {
In the product build the "Use64KPagesThreshold" is a constant so clang complains . However in the (fast)debug builds one can set Use64KPagesThreshold with an -XX setting. So I think it is best to disable the warning.
shift-negative-value : (seen in c1_LIRGenerator_ppc.cpp)
/jdk/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp:429:97: warning: shifting a negative signed value is undefined [-Wshift-negative-value] (x->op() == Bytecodes::_lsub && right.value()->type()-
as_LongConstant()->value() == ((-1)<<15)) ) { ~~~~^ /jdk/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp:483:96: warning: shifting a negative signed value is undefined [-Wshift-negative-value] (x->op() == Bytecodes::_isub && right.value()->type()->as_IntConstant()- value() == ((-1)<<15)) ) {
We could probably replace the -1 shift by a constant but I think it is nicely readable .
Bug/webrev :
https://bugs.openjdk.java.net/browse/JDK-8228426
http://cr.openjdk.java.net/~mbaesken/webrevs/8228426.0/
Thanks, Matthias