[Bug c/39252] Request new feature __builtin_not_reached();
hpa at zytor dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 19 21:58:00 GMT 2009
------- Comment #3 from hpa at zytor dot com 2009-02-19 21:58 -------
Two reasons:
1. We have no control over what instruction __builtin_trap() will generate.
2. We require the address of the faulting instruction.
In particular, we currently have a construct which looks like:
#ifdef CONFIG_X86_32
# define __BUG_C0 "2:\t.long 1b, %c0\n"
#else
# define __BUG_C0 "2:\t.long 1b - 2b, %c0 - 2b\n"
#endif
#define BUG() \
do { \
asm volatile("1:\tud2\n" \
".pushsection __bug_table,\"a\"\n" \
__BUG_C0 \
"\t.word %c1, 0\n" \
"\t.org 2b+%c2\n" \
".popsection" \
: : "i" (__FILE__), "i" (__LINE__), \
"i" (sizeof(struct bug_entry))); \
for (;;) ; \
} while (0)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39252
More information about the Gcc-bugs
mailing list