os_thread is not handled by os::create_thread in os_windows.cpp

Julian Waters tanksherman27 at gmail.com
Mon Jul 24 08:15:28 UTC 2023


Hi all,

I just wanted to give a heads up that gcc catches a case inside
os::create_thread in os_windows.cpp, in a switch statement that enumerates
over all possible thread types. The warning states that threads of type
os_thread are not handled:

src/hotspot/os/windows/os_windows.cpp: In static member function 'static
bool os::create_thread(Thread*, ThreadType, size_t)':
d:/eclipse/workspace/jdk/src/hotspot/os/windows/os_windows.cpp:715:12:
error: enumeration value 'os_thread' not handled in switch [-Werror=switch]
  715 |     switch (thr_type) {
         |            ^
cc1plus.exe: all warnings being treated as errors

I initially used to silence this warning, but since I don't know how
threads of type os_thread should be handled or if this is intentional, I'm
raising this to the attention of any HotSpot developers that know about
this more than me in case this is a bug.

best regards,
Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20230724/45063de4/attachment.htm>


More information about the hotspot-dev mailing list