RFR: 8302124: HotSpot Style Guide should permit noreturn attribute

Kim Barrett kbarrett at openjdk.org
Fri Feb 10 08:44:41 UTC 2023


On Fri, 10 Feb 2023 06:08:45 GMT, Thomas Stuefe <stuefe 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.

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

PR: https://git.openjdk.org/jdk/pull/12507


More information about the hotspot-dev mailing list