RFR: 8302124: HotSpot Style Guide should permit noreturn attribute
Thomas Stuefe
stuefe at openjdk.org
Fri Feb 10 13:51:44 UTC 2023
On Fri, 10 Feb 2023 08:41:54 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> > This sounds useful.
> > I try to think of cases where the fact that the compiler optimizes away follow-up instructions could be surprising. But with noreturn the compiler should warn, right, about non-reachable instructions?
>
> I'm sure there is code that is rendered dead by making the assertion failure reporting functions noreturn, but no warnings were given by any compiler I tried.
That is regrettable, but noreturn sounds useful nevertheless.
-------------
PR: https://git.openjdk.org/jdk/pull/12507
More information about the hotspot-dev
mailing list