RFR: 8213416: Replace some enums with static const members in hotspot/compiler
rahul.v.raghavan at oracle.com
Thu May 16 09:56:57 UTC 2019
Thank you David for review comments.
I will kindly request help from Magnus to reply for the main questions.
Sharing some notes, related links -
- 8211073: Remove -Wno-extra from Hotspot
- Discussions in earlier thread -
So understood -Wextra do help in catching valid/useful warnings also,
but along with some too strict ones like "enumeral and non-enumeral type
in conditional expression" type warnings.
Extracts from 8211073 JBS comments from Magnus regarding the
"... If you think that gcc is a bit too picky here, I agree. It's not
obvious per se that the added casts improve the code. However, this is
the price we need to pay to be able to enable -Wextra, and *that* is
something that is likely to improve the code."
On 16/05/19 11:13 AM, David Holmes wrote:
> This all seems like unnecessary churn to me - is any of this code
> actually wrong? can we not just disable this particular warning? is
> there any point using "static const" when we should be aiming to use
> C++11 constexpr in the (not too distant?) future?
> Converting from enums to unrelated ints seems a big step backwards in
> software engineering terms. :(
More information about the hotspot-compiler-dev