[PATCH 1/2] score: Add RTEMS_UNREACHABLE

Chris Johns chrisj at rtems.org
Tue Mar 22 06:58:54 UTC 2016


On 22/03/2016 17:25, Sebastian Huber wrote:
> ---
>   cpukit/score/include/rtems/score/basedefs.h | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
> index facaed9..5d7f5b4 100644
> --- a/cpukit/score/include/rtems/score/basedefs.h
> +++ b/cpukit/score/include/rtems/score/basedefs.h
> @@ -191,6 +191,15 @@
>   /* Provided for backward compatibility */
>   #define RTEMS_COMPILER_PACKED_ATTRIBUTE RTEMS_PACKED
>
> +/**
> + * @brief Tells the compiler that this program point is unreachable.
> + */
> +#if defined(__GNUC__)
> +  #define RTEMS_UNREACHABLE() __builtin_unreachable()
> +#else
> +  #define RTEMS_UNREACHABLE()
> +#endif
> +

+1



More information about the devel mailing list