Inline-asm poll.

GCC is looking how to improve __builtin_unreachable behavior by maybe expanding it to a trap instruction instead of following through to the next function.

So the original reason why __builtin_unreachable[https://gcc.gnu.org/PR39252] was added was to mark inline-asm as not "returning" for use inside the Linux Kernel.
There was an old patch (https://gcc.gnu.org/legacy-ml/gcc-patches/2000-01/msg00190.html) which adds "pc" as a clobber to do it too.
Though with the raise of attributes, maybe it is better to use an attribute on the inline-asm.

So the poll is what syntax would be better.

Please spread this wide. I will doing a more formal poll on both GCC's mailing list and LLVM discourse next week after this informal poll is finished but I want to get some ideas/inputs here first before I submit a RFC. I will implementing the GCC side of things and hope someone on the LLVM will pickup the LLVM side.

[[gnu::return]] volatile asm (...)
23.9%
asm("":::"pc")
30.4%
keep __builtin_unreachable the same
41.3%
Other: reply with what you think.
4.3%
Poll ended at .
Making sure you're not a bot!

@pinskia Another option would be to create a new __builtin_unreachable_notrap() which never emits a trap instruction (and which can easily be defined to __builtin_unreachable, for compatibility with older compilers).

Then, a few years later, when someone decides to make that also emit a trap, we could create a new __builtin_unreachable_really_notrap() which never emits a trap instruction. And so on.