unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Martin Sebor via Libc-alpha <libc-alpha@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>,
	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 13:07:01 -0600	[thread overview]
Message-ID: <d1918aac-7933-5533-2b06-f4e84c18114a@gmail.com> (raw)
In-Reply-To: <875z08qqy8.fsf@oldenburg.str.redhat.com>

On 4/26/21 10:41 PM, Florian Weimer wrote:
> * 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.

You're right.  I had inadvertently reverted the pthread.h changes so
my testing didn't expose it.  Too many patches in the same tree...
I've committed a1561c3bbe with the missing definition (and retesting
the macro).

> 
> It might be consistent with fewer attribute access extensions to write
> __attr_access_none ((__none__, 2)) instead of __attr_access_none (2).

Repeating the "none" part doesn't seem in any way useful to me.  It
wouldn't reduce the number of macros, existing or new.

Martin

> 
> Thanks,
> Florian
> 


  reply	other threads:[~2021-04-27 19:07 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
2021-04-27 19:07   ` Martin Sebor via Libc-alpha [this message]
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=d1918aac-7933-5533-2b06-f4e84c18114a@gmail.com \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=msebor@gmail.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).