[PATCH:libXt 3/6] Mark non-returning function with appropriate attribute.
Alan Coopersmith
alan.coopersmith at oracle.com
Tue Jun 25 14:20:58 PDT 2013
On 06/25/13 02:02 PM, Thomas Klausner wrote:
> ---
> src/Error.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/Error.c b/src/Error.c
> index fc9b11a..334e001 100644
> --- a/src/Error.c
> +++ b/src/Error.c
> @@ -75,6 +75,13 @@ in this Software without prior written authorization from The Open Group.
> #include <stdio.h>
> #include <stdlib.h>
>
> +#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
> + || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
> +# define ATTR_NORETURN __attribute((noreturn))
> +#else
> +# define ATTR_NORETURN
> +#endif /* GNUC */
> +
We prefer to use _X_NORETURN from <X11/Xfuncproto.h> so we don't have to
individually edit 100 modules when another compiler adds support for a
given attribute.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list