[13] RFR: 8213416: Replace some enums with static const members in hotspot/compiler
Rahul Raghavan
rahul.v.raghavan at oracle.com
Thu May 16 09:56:57 UTC 2019
Hi,
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
https://bugs.openjdk.java.net/browse/JDK-8211073
- Discussions in earlier thread -
https://mail.openjdk.java.net/pipermail/hotspot-dev/2018-September/034314.html
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
'enum-warning' -
"... 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."
Thanks,
Rahul
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. :(
>
> Cheers,
> David
> -----
>
More information about the hotspot-dev
mailing list