This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] ucontext.h: Add __INDIRECT_RETURN
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: "H.J. Lu" <hongjiu dot lu at intel dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Wed, 18 Jul 2018 23:06:15 +0200
- Subject: Re: [PATCH] ucontext.h: Add __INDIRECT_RETURN
- References: <20180718173558.GA18109@intel.com>
* H. J. Lu:
> +#ifndef __INDIRECT_RETURN
> +# if defined __CET__ && (__CET__ & 2) != 0
> +/* Note: Functions returned via indirect branch returns once. Without
The grammar seems to be a bit off here.
> + indirect_return attribute in GCC 9, use returns_twice attribute. */
> +# if __GNUC_PREREQ (9, 0)
> +# define __INDIRECT_RETURN __attribute__ ((__indirect_return__))
> +# else
> +# define __INDIRECT_RETURN __attribute__ ((__returns_twice__))
> +# endif
> +# endif
> +#endif
Do you expect distributions to backport support for the
indirect_return attribute into GCC 8? Then this will not work.