RFR: 8304939: os::win32::exit_process_or_thread should be marked noreturn [v5]

Julian Waters jwaters at openjdk.org
Mon Oct 30 13:02:37 UTC 2023


On Mon, 30 Oct 2023 07:44:20 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Revert to exit_code in os_windows.cpp
>
> src/hotspot/os/windows/os_windows.cpp line 510:
> 
>> 508: enum Ept { EPT_THREAD, EPT_PROCESS, EPT_PROCESS_DIE };
>> 509: // Wrapper around _endthreadex(), exit() and _exit()
>> 510: [[noreturn]]
> 
> We (currently) have ATTRIBUTE_NORETURN.  However, this is Windows/MSVC-specific code, so I'm okay
> with using the portable attribute directly, since we require a sufficiently recent version of MSVC to have this.
> Note, however, that this won't work with older versions of clang, which is the raison d'etre for the attribute
> macro.  Just so you know, since you've been trying to build for Windows with other compilers.

I'm not affected by this change, since I only compile using gcc, but Daniel, who uses clang, might be. I'll check with him to see

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16303#discussion_r1376178299


More information about the hotspot-dev mailing list