From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C99101F5AE for ; Tue, 27 Apr 2021 19:07:07 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E76983896C10; Tue, 27 Apr 2021 19:07:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E76983896C10 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619550427; bh=qwp/Ki699MOGC4Ao94687ercYuvL8ja7O2dADGW58l0=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=fnLcm3dri6h661wwnsn0kehgjrkjC6JiddquNxWxxanlyaPwhZ8ewJKbmtgovl591 79Uh4cax1XOZXgvlIe5aKnrGRSIh7e1NtOM9H+IJxsTIIzIlq6dQXu6UBlHpVTxHhn Ooi8Zws+0b5ofKy5PYx7QyV4jZxBz5uU/5Hbfx7Y= Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by sourceware.org (Postfix) with ESMTPS id 2182D3896822 for ; Tue, 27 Apr 2021 19:07:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2182D3896822 Received: by mail-qk1-x732.google.com with SMTP id q127so1938693qkb.1 for ; Tue, 27 Apr 2021 12:07:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qwp/Ki699MOGC4Ao94687ercYuvL8ja7O2dADGW58l0=; b=T2NxVN5fmpZClq9kuZndh2NHJ5uSqvnmZ9MYeQ+BjsCthZXg3DTSWy047VY9VBZ/87 ENApsZMAXlxpnnKz6uu3YpAPfyktyMg8bgshjjH/gbV2WMjkuSl8930bI4QS7vTXgHxA V9AqWko7wT7UrOxX4gwWnXznjvIVWrHDQvxfgEey7f7N60iKg4WdcTXa7z5ZqTRmdqFp P59Hh89E0d2RLDKdhtAv7l/nO1hpsryrt9W0g5BOOOIIiZXSkSc/wXLy8fMAImgSJN0Q XoIH+/HZSFHVv2Di2CcSQ9hdYZUmUNAf0/ZLbievdDkDi0ydcTWp3r8oOsp/gb7uub51 TFSg== X-Gm-Message-State: AOAM530F7G+MZO+6pHza7Eor8L4sSrWnCSOTdXe2F2U+QHaG8n+8HFKZ AXAa9ab8iVi+vKcTKKUvAQp8mI88OFA= X-Google-Smtp-Source: ABdhPJxR6w3aiHPc8aHSMALfrxfRQvzQMd+qO2eqhQv093+n+RwzRtrCBxi1+QT9c/+m4GA34S4ZYQ== X-Received: by 2002:a37:9c01:: with SMTP id f1mr12855394qke.109.1619550423410; Tue, 27 Apr 2021 12:07:03 -0700 (PDT) Received: from [192.168.0.41] (71-218-14-121.hlrn.qwest.net. [71.218.14.121]) by smtp.gmail.com with ESMTPSA id l71sm3416802qke.27.2021.04.27.12.07.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Apr 2021 12:07:03 -0700 (PDT) Subject: Re: [PATCH] add attribute none to pthread_setspecific (BZ #27714) To: Florian Weimer , Martin Sebor via Libc-alpha References: <2ec7fadb-cc15-a005-f708-d2adecc8cc39@gmail.com> <875z08qqy8.fsf@oldenburg.str.redhat.com> Message-ID: Date: Tue, 27 Apr 2021 13:07:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <875z08qqy8.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Martin Sebor via Libc-alpha Reply-To: Martin Sebor Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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, [, ]) */ >> -#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 >