hotspot/src/share/vm/runtime/virtualspace.cpp:527:14: error: ordered comparison between pointer and zero ('char *' and 'int') if (base() > 0) { ~~~~~~ ^ ~ hotspot/src/share/vm/runtime/virtualspace.cpp:546:14: error: ordered comparison between pointer and zero ('char *' and 'int') if (base() > 0) { ~~~~~~ ^ ~ regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
java/openjdk8 also has hotspot/src/share/vm/opto/lcm.cpp:52:35: error: ordered comparison between pointer and zero ('address' (aka 'unsigned char *') and 'int') if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops. ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Created attachment 178865 [details] possible fix Can you double-check or switch to upstream fix (if any)?
I asked the implementer of that upstream change: >> There will probably be more of these. Is it the intent of this change that >> such software must now be patched up? > > That is the intent; such code is not valid c++ any more per the latest defect > resolutions (and is not valid C). Depending on the level of pain, we could > allow these comparisons as an extension, so I would welcome your input here. > However (for instance) the example above looks like a bug. E.g. ordered comparisons between pointers and (integer) zero are invalid, and should be fixed.
Thanks Jan. I'd love to upstream this fix, but to do so you'd need to sign the oracle contributor agreement. Are you willing/able to do that? http://openjdk.java.net/contribute/
A commit references this bug: Author: glewis Date: Sun Jan 15 22:50:38 UTC 2017 New revision: 431605 URL: https://svnweb.freebsd.org/changeset/ports/431605 Log: . Fix compilation with Clang 4.0 PR: 216016 Submitted by: jbeich@ Changes: head/java/openjdk7/Makefile head/java/openjdk7/files/patch-hotspot_src_share_vm_runtime_virtualspace.cpp
A commit references this bug: Author: glewis Date: Sun Jan 15 22:51:52 UTC 2017 New revision: 431607 URL: https://svnweb.freebsd.org/changeset/ports/431607 Log: . Fix compilation with Clang 4.0 PR: 216016 Submitted by: jbeich@ Changes: head/java/openjdk8/Makefile head/java/openjdk8/files/patch-hotspot_src_share_vm_opto_lcm.cpp head/java/openjdk8/files/patch-hotspot_src_share_vm_runtime_virtualspace.cpp
(In reply to Greg Lewis from comment #4) > I'd love to upstream this fix, but to do so you'd need to sign the > oracle contributor agreement. Are you willing/able to do that? No. CLAs don't respect privacy and try to bind individuals rather than code. OCA isn't any better. So, I'm putting my change here into public domain instead. Upstream is likely to come up with a similar fix as part of building for new Android or OS X releases, anyway.
> need to sign the oracle contributor agreement Do they have an exception for very small changes like this? The FSF goes even further and requires copyright assignment, but they've accepted similar changes from me for binutils w/o it.
That's a good question. I'll have to see if I can find out.
A commit references this bug: Author: jbeich Date: Thu Jan 19 05:30:36 UTC 2017 New revision: 431848 URL: https://svnweb.freebsd.org/changeset/ports/431848 Log: MFH: r431605 by glewis . Fix compilation with Clang 4.0 PR: 216016 Submitted by: jbeich@ Approved by: ports-secteam blanket Changes: _U branches/2017Q1/ branches/2017Q1/java/openjdk7/Makefile branches/2017Q1/java/openjdk7/files/patch-hotspot_src_share_vm_runtime_virtualspace.cpp
A commit references this bug: Author: jbeich Date: Thu Jan 19 05:33:20 UTC 2017 New revision: 431849 URL: https://svnweb.freebsd.org/changeset/ports/431849 Log: MFH: r431607 by glewis . Fix compilation with Clang 4.0 PR: 216016 Submitted by: jbeich@ Approved by: ports-secteam blanket Changes: _U branches/2017Q1/ branches/2017Q1/java/openjdk8/Makefile branches/2017Q1/java/openjdk8/files/patch-hotspot_src_share_vm_opto_lcm.cpp branches/2017Q1/java/openjdk8/files/patch-hotspot_src_share_vm_runtime_virtualspace.cpp