RFR: 8302124: HotSpot Style Guide should permit noreturn attribute
Julian Waters
jwaters at openjdk.org
Mon Feb 27 11:49:14 UTC 2023
On Mon, 27 Feb 2023 10:46:17 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Moving to a newer C++ language version requires compiler support, for all
>> supported OpenJDK ports (*). Only recently has the xlclang compiler used by
>> the aix-ppc port had a version that supported C++17. (I think it was released
>> last summer/fall.) I don't know when they might release a version supporting
>> C++20. Use of that new version is being investigated by the port maintainers.
>> I've done a little bit of peeking ahead to C++17 as well, and haven't yet run
>> into any problems with the Oracle-supported ports (which is what I expected).
>>
>> (*) Non-open licensee ports also need to be considered, though I'm not sure
>> what the requirements are there. I know of one such that didn't yet have
>> complete C++14 support when we adopted it for OpenJDK.
>
>> I've no idea how standard attributes and gcc `__attribute__` or msvc `__declspec` interact syntactically. My hope would be that they can interleave, but I have no idea whether that's true or not. I guess some research is needed, though I think it doesn't matter for the current set. (I doubt anyone is going to declare a function both noreturn and always-inline, for example.)
>
> I did some experimenting, and it looks like they interleave without any problems. And I even found a potential
> use-case for noreturn + always-inline. :)
Ah, that's interesting. If you don't mind, what would said combination end up doing? I'm a little curious :P
It's frustrating that C++20 is still going to have to wait for xlc though. Guess we'll have to wait for longer before we can use those guaranteed inline/noinline Visual C++ attributes :(
-------------
PR: https://git.openjdk.org/jdk/pull/12507
More information about the hotspot-dev
mailing list