false 'noreturn' function does return warnings

Zack Weinberg zackw@panix.com
Tue Feb 6 23:32:00 GMT 2007


Back in 2000 I wrote a really simple patch that caused gcc to treat an
ASM_OPERANDS that clobbered "pc" as a control flow barrier, exactly
for this problem.

http://gcc.gnu.org/ml/gcc-patches/2000-01/msg00190.html

I still think it was a good idea, but at the time it was received
unenthusiastically.  I especially think "just use __builtin_trap()"
misses the mark - at least some variants of the Linux kernel's BUG()
macro, for instance, want to stick annotations in the assembly stream,
which you cannot do with __builtin_trap...

zw



More information about the Gcc mailing list