From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: Martin Sebor via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] add attribute none to pthread_setspecific (BZ #27714)
Date: Tue, 27 Apr 2021 06:41:51 +0200 [thread overview]
Message-ID: <875z08qqy8.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <2ec7fadb-cc15-a005-f708-d2adecc8cc39@gmail.com> (Martin Sebor via Libc-alpha's message of "Thu, 22 Apr 2021 15:30:15 -0600")
* Martin Sebor via Libc-alpha:
> diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
> index 8e244a77cf..ac56be4d87 100644
> --- a/misc/sys/cdefs.h
> +++ b/misc/sys/cdefs.h
> @@ -592,8 +592,14 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
> array according to access mode, or at least one element when
> size-index is not provided:
> access (access-mode, <ref-index> [, <size-index>]) */
> -#define __attr_access(x) __attribute__ ((__access__ x))
> +# define __attr_access(x) __attribute__ ((__access__ x))
> +# if __GNUC_PREREQ (11, 0)
> +# define __attr_access_none(pos) __attribute__ ((__access__ (__none__, pos)))
> +# endif
> #else
> # define __attr_access(x)
> +# define __attr_access_none(pos)
> +#endif
I don't think this works because __attr_access_none is not defined for
GCC 10 due to the way the definitions are nested. I think you should
move the __GNUC_PREREQ (11, 0) check to the top level.
It might be consistent with fewer attribute access extensions to write
__attr_access_none ((__none__, 2)) instead of __attr_access_none (2).
Thanks,
Florian
next prev parent reply other threads:[~2021-04-27 4:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 21:30 [PATCH] add attribute none to pthread_setspecific (BZ #27714) Martin Sebor via Libc-alpha
2021-04-22 22:26 ` Martin Sebor via Libc-alpha
2021-04-23 0:11 ` Paul Eggert
2021-04-23 15:24 ` Martin Sebor via Libc-alpha
2021-04-23 20:19 ` Paul Eggert
2021-04-23 21:29 ` Martin Sebor via Libc-alpha
2021-04-24 0:27 ` Paul Eggert
2021-04-26 19:38 ` Martin Sebor via Libc-alpha
2021-04-27 4:41 ` Florian Weimer via Libc-alpha [this message]
2021-04-27 19:07 ` Martin Sebor via Libc-alpha
2021-04-27 21:07 ` Joseph Myers
2021-04-27 21:46 ` Martin Sebor via Libc-alpha
2021-04-27 21:58 ` Joseph Myers
2021-04-27 22:57 ` Martin Sebor via Libc-alpha
2021-04-28 1:09 ` Martin Sebor via Libc-alpha
2021-04-28 7:32 ` Florian Weimer via Libc-alpha
2021-04-28 14:49 ` Martin Sebor via Libc-alpha
2021-04-29 7:45 ` Florian Weimer via Libc-alpha
2021-04-29 14:55 ` Martin Sebor via Libc-alpha
2021-04-29 16:16 ` Florian Weimer via Libc-alpha
2021-04-28 1:30 ` H.J. Lu via Libc-alpha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875z08qqy8.fsf@oldenburg.str.redhat.com \
--to=libc-alpha@sourceware.org \
--cc=fweimer@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).