On Fri May 16 21:05:07 2025 +0000, Yuxuan Shui wrote:
I think GCC does support SEH? i.e. it will happily use it for C++ exceptions. (I contemplated suggesting using C++ but only for exception handling). It also generates enough SEH directives for functions so they can be unwound (urgh, i don't know the terminologies for these). That's why mingw's `__try1/__except1` work (to an extent). And yes, clang does support `__try/__except`, but for windows targets only. wine also uses them on the unix side.
Yes, gcc only supports them in C++ mode, and clang only in MSVC mode. That's not good enough in general, but it may be usable for your purposes.