RFR: 8302124: HotSpot Style Guide should permit noreturn attribute
Kim Barrett
kbarrett at openjdk.org
Sun Feb 12 01:14:27 UTC 2023
On Sun, 12 Feb 2023 00:00:53 GMT, Andrew Haley <aph at openjdk.org> wrote:
> I'd be careful. A call to an error routine marked noreturn can turn into a tail call (i.e. a jump) to it. That messes up backtraces.
Explicitly not so for gcc.
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Common-Function-Attributes.html#Common-Function-Attributes
Under "noreturn"
"In order to preserve backtraces, GCC will never turn calls to noreturn functions into tail calls."
I don't know about other compilers, but I would think they would want to do something similar.
-------------
PR: https://git.openjdk.org/jdk/pull/12507
More information about the hotspot-dev
mailing list