This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add new built-in: __builtin_unreachable()


* David Daney wrote on Mon, Jun 08, 2009 at 08:34:31PM CEST:
> --- gcc/doc/extend.texi	(revision 147888)
> +++ gcc/doc/extend.texi	(working copy)
> @@ -6813,6 +6813,43 @@ intentionally executing an illegal instr
>  you should not rely on any particular implementation.
>  @end deftypefn
>  
> +@deftypefn {Built-in Function} void __builtin_unreachable (void)
> +If control flow reaches the point of the @code{__builtin_unreachable ();},
> +the program is undefined.  It is useful in situations where the
> +compiler cannot deduce the unreachability of the code.  One such case
> +is immediately following an @code{asm} statement that either never
> +exits or transfers control elsewhere never returning.

FWIW, I keep misreading this sentence in a way that the asm statement
never calls exit(3), and then this would only make sense to me if the
asm statement always exits, not never.

Cheers,
Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]