RFR: 8240259: Disable -Wshift-negative-value warnings
Kim Barrett
kim.barrett at oracle.com
Fri May 29 01:33:30 UTC 2020
> On May 28, 2020, at 8:23 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
>
> Looks good to me.
Thanks.
> When I enabled c++14 in gcc, I had to do a few of these manually and didn't see any test failures, so I think the gcc warning isn't really catching anything bad in our code.
>
> Thanks
> - Ioi
>
> Node* RShiftINode::Identity(PhaseGVN* phase) {
> ...
> #ifdef __GNUC__
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wshift-negative-value"
> #endif
> int lo = (-1 << (BitsPerJavaInteger - ((uint)shift)-1)); // FFFF8000
> #ifdef __GNUC__
> #pragma GCC diagnostic pop
> #endif
Yes, that one looks familiar. I thought there were a couple more, but maybe
they disappeared in other code changes. I haven’t tried doing a C++14 build
without that warning disabled for quite a while.
More information about the hotspot-dev
mailing list