-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b01
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8248941 | 8u271 | David Buck | P2 | Resolved | Fixed | b01 |
JDK-8244881 | 8u251 | David Buck | P2 | Resolved | Fixed | b34 |
JDK-8251619 | emb-8u271 | David Buck | P2 | Resolved | Fixed | team |
JDK-8246878 | emb-8u261 | David Buck | P2 | Resolved | Fixed | team |
In 8u HotSpot there are several Wparentheses warnings which causes compilation failure on recent versions of Xcode. We will fix these warnings as part of our toolchain upgrade effort.
This is somewhat complicated by the fact that enabling (or disabling) Wparentheses also changes the default for a number of other parentheses-related warnings [0]. In the current 8u hotspot code, the following warnings are applicable:
logical-op-parentheses
bitwise-op-parentheses
parentheses-equality
parentheses
The first two are already explicitly disabled in gcc.make and will be addressed (very soon) with their own individual bug/changesets. This fix is exclusively for the warnings generated as a result of Wparentheses (and Wbitwise-op-parentheses, which is implicitly disabled by Wno-parentheses).
The two warnings of interest are:
warning: '&' within '|' [-Wbitwise-op-parentheses]
warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
This is a partial backport of Paul Hohensee's massive cleanup [1] of Xcode warnings. A complete backport of that chnageset is well beyond the scope of our toolchain upgrade work. But we do want to clean up as many warnings as we can with minimal risk.
[0] https://clang.llvm.org/docs/DiagnosticsReference.html#wparentheses
[1] http://hg.openjdk.java.net/jdk10/jdk10/hotspot/rev/c044f8d03932
This is somewhat complicated by the fact that enabling (or disabling) Wparentheses also changes the default for a number of other parentheses-related warnings [0]. In the current 8u hotspot code, the following warnings are applicable:
logical-op-parentheses
bitwise-op-parentheses
parentheses-equality
parentheses
The first two are already explicitly disabled in gcc.make and will be addressed (very soon) with their own individual bug/changesets. This fix is exclusively for the warnings generated as a result of Wparentheses (and Wbitwise-op-parentheses, which is implicitly disabled by Wno-parentheses).
The two warnings of interest are:
warning: '&' within '|' [-Wbitwise-op-parentheses]
warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
This is a partial backport of Paul Hohensee's massive cleanup [1] of Xcode warnings. A complete backport of that chnageset is well beyond the scope of our toolchain upgrade work. But we do want to clean up as many warnings as we can with minimal risk.
[0] https://clang.llvm.org/docs/DiagnosticsReference.html#wparentheses
[1] http://hg.openjdk.java.net/jdk10/jdk10/hotspot/rev/c044f8d03932
- backported by
-
JDK-8244881 [8u] enable Wparentheses warnings in HotSpot
- Resolved
-
JDK-8246878 [8u] enable Wparentheses warnings in HotSpot
- Resolved
-
JDK-8248941 [8u] enable Wparentheses warnings in HotSpot
- Resolved
-
JDK-8251619 [8u] enable Wparentheses warnings in HotSpot
- Resolved