https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105576
Julian Waters <tanksherman27 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tanksherman27 at gmail dot com --- Comment #7 from Julian Waters <tanksherman27 at gmail dot com> --- Strangely, the following works if compiled with optimizations enabled, -O1 and above, but not with -O0, when optimizations are disabled [[gnu::extended(; [dispatcher] "i" (static_cast<void (*) () noexcept>([] () noexcept -> void {})); ; start)]] asm (R"( .endif .rva %l[start], 1f, %c[dispatcher], 2f .seh_code )"); With -O0 the error is exceptions.cpp: In function 'void exceptions()': exceptions.cpp:59:5: warning: 'asm' operand 0 probably does not match constraints 59 | asm (R"( | ^~~ exceptions.cpp:59:5: error: impossible constraint in 'asm' With -O1 and above, %c[dispatcher] yields: .rva .L2, 1f, _ZZL10exceptionsvENUlPVK19_EXCEPTION_POINTERSPVKvE0_4_FUNES1_S3_, 2f