From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89238 invoked by alias); 13 Jul 2018 21:09:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 89228 invoked by uid 89); 13 Jul 2018 21:09:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-vk0-f68.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NgdHiql5ydNVmmOGaHJsUicf5aL7ntEpuv7rFbspKPk=; b=F1Q/VfiCJHkz6Fq5bBsObME12o3q1Qvfl+q6rVlNN5d+UZggE/RWPVOsq2t4aiU2kc MJbTi3DzC6S1+MdZbmtZM6OhfJdU6OGjfaLwdMgpKipd+eKs5uktAPFFGIpi9BDUO7Gq oxqO6ZB410raJmWdr5W8eKF3SI8MYtK1Atjx8= Return-Path: Subject: Re: [PATCH v8 6/8] nptl: Add abilist symbols for C11 threads To: Florian Weimer Cc: Florian Weimer , libc-alpha@sourceware.org References: <1517591084-11347-1-git-send-email-adhemerval.zanella@linaro.org> <1517591084-11347-7-git-send-email-adhemerval.zanella@linaro.org> <97b42cb3-e76a-ac71-65cd-c1f6d8c404aa@redhat.com> <90dc04ab-81df-b0d7-a086-d00ea5cc979d@linaro.org> <5ec19a17-30a3-e9b7-9475-c28b247c8daa@redhat.com> <98a36756-5dc8-680b-c065-3501ca4ec7d4@linaro.org> <87muuuc3jw.fsf@mid.deneb.enyo.de> From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: <7f8e17f2-198f-a2cc-8fc1-be1979605229@linaro.org> Date: Fri, 13 Jul 2018 21:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <87muuuc3jw.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-07/txt/msg00403.txt.bz2 On 13/07/2018 16:56, Florian Weimer wrote: > * Adhemerval Zanella: > >>> I think ONCE_FLAG_INIT needs to be a compound literal, not an >>> initializer, at least that's how I read the standard (“which expands >>> to a value that can be used to initialize an object”). >> >> Right, you are correct, this will prevent ONCE_FLAG_INIT to be wrongly >> used to initialize other objects than once_flag. I adjust to be a >> struct as well. > > Sorry, I forgot that this needs another __cplusplus conditional. > > Something like this: > > #ifdef __cplusplus > # define ONCE_FLAG_INIT (once_flag {}) > #else > # define ONCE_FLAG_INIT (once_flag) { 0 } > #endif > > Compound literals in C++ are a GCC extension. Fixed.