RFR: 8337418: Fix -Wzero-as-null-pointer-constant warnings in prims code

Julian Waters jwaters at openjdk.org
Tue Jul 30 11:54:34 UTC 2024


On Tue, 30 Jul 2024 06:54:10 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> src/hotspot/share/prims/methodHandles.cpp line 439:
>> 
>>> 437:   default:
>>> 438:     fatal("unexpected intrinsic id: %d %s", vmIntrinsics::as_int(iid), vmIntrinsics::name_at(iid));
>>> 439:     return 0;
>> 
>> Do we no longer need these returns after `fatal` to keep compilers happy?
>
> Now that we have, and are using, `[[noreturn]]` on all platforms, we no longer need that dead code.

I'll admit, I do prefer having a return to end all possible control flows in a non void method, but oh well

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20385#discussion_r1696829614


More information about the serviceability-dev mailing list