From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by sourceware.org (Postfix) with ESMTPS id 92498394480D for ; Fri, 23 Apr 2021 21:29:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 92498394480D Received: by mail-qt1-x82a.google.com with SMTP id u8so37395306qtq.12 for ; Fri, 23 Apr 2021 14:29:41 -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:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=N3n34wiNYmeVEYY0hO0KlsSeY5O05S1uPPIekUxhj4c=; b=ujOvv05BCH6txj/NHYed135/zjfRwxZK+33Py5CLFmvikyb0y8HB+DI1TnleqbViXw 1qit3DLr99bmAqblvOGlQxh7t5Y19R6b2piEypv9UAx+zUzlGPK1TZnBs7bHu5YwLuC9 SeFpwBgQ/8Q9rgAVHQgXNyxyr9XHK9G9SO52ScI/TFGFzgzWhagCrxOnfrzhcJi52tlv rIe5x3SK3kw1M31bGPKHh87XdsfyZ8p7q99gj49X4WW7IFNj0njqqfTOmuvDQK/NgBRG 4SjS0su9hR8fZfYAmRUyXJufzFlhyIW1JIZvygdkPmazSxP/5py4tNwJcX5l1ge5wURG Op3Q== X-Gm-Message-State: AOAM530dPlaEho1mfXSPmadrtM/aJqyRHyFwcKk/mX9dKeIgBjnxCufG yMLINOS4PPfMRZdYCn0ySSORvXhdLTA= X-Google-Smtp-Source: ABdhPJyJ5CbBuRX1zFU2/Vbhlh7+Z1JmOf1/ngLZ8jjfeRWWeU474LNGKCrt+qNRAx6Z3eIqZPv/OA== X-Received: by 2002:a05:622a:100f:: with SMTP id d15mr5917891qte.2.1619213381093; Fri, 23 Apr 2021 14:29:41 -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 f16sm5275306qkl.25.2021.04.23.14.29.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Apr 2021 14:29:40 -0700 (PDT) Subject: Re: [PATCH] add attribute none to pthread_setspecific (BZ #27714) To: Paul Eggert Cc: GNU C Library References: <2ec7fadb-cc15-a005-f708-d2adecc8cc39@gmail.com> <6c23d4f8-9c48-6bf6-ed13-a02ac66bc92b@cs.ucla.edu> From: Martin Sebor Message-ID: Date: Fri, 23 Apr 2021 15:29:39 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Fri, 23 Apr 2021 21:29:42 -0000 On 4/23/21 2:19 PM, Paul Eggert wrote: > On 4/23/21 8:24 AM, Martin Sebor wrote: >> >> I think we considered variadic macros >> when we first introduced the attribute but rejected it for some >> reason that I'm not sure I remember.  Maybe because they're a C99 >> feature and Glibc supports older compilers? > > That shouldn't be an issue here, since the suggested change uses > variadic macros for GCC 10 only. > > Unless people were worried about running something like 'gcc -ansi' or > 'gcc -std=c89? To head that off at the pass, we can do the GCC 10 stuff > only if !__STRICT_ANSI__. Also, while we're at it we should be > C99-compatible in the variadic part (i.e., at least one named argument). > Something like the attached (untested) patch, say. I'm open to your suggestion to use the variadic macros if no one objects to it. GCC doesn't let language conformance modes affect unrelated warnings (like -Wuninitialized) and I am not in favor of introducing such a distinction in Glibc. We routinely get bug reports about false negatives that boil down to the sensitivity of these warnings (especially -Wuninitialized) to optimization settings. I wouldn't want to compound the problem. Martin