From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69557 invoked by alias); 13 Jul 2018 20:00:54 -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 69376 invoked by uid 89); 13 Jul 2018 20:00:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy= X-HELO: albireo.enyo.de From: Florian Weimer To: Adhemerval Zanella Cc: Florian Weimer , libc-alpha@sourceware.org Subject: Re: [PATCH v8 6/8] nptl: Add abilist symbols for C11 threads 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> Date: Fri, 13 Jul 2018 20:00:00 -0000 In-Reply-To: <98a36756-5dc8-680b-c065-3501ca4ec7d4@linaro.org> (Adhemerval Zanella's message of "Fri, 13 Jul 2018 15:47:43 -0300") Message-ID: <87muuuc3jw.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-07/txt/msg00400.txt.bz2 * 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 (=E2=80=9Cwhich exp= ands >> to a value that can be used to initialize an object=E2=80=9D). > > Right, you are correct, this will prevent ONCE_FLAG_INIT to be wrongly=20 > used to initialize other objects than once_flag. I adjust to be a=20 > 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. >>> =C2=A0=C2=A0 - thread_local guards for C++. >>=20 >> Missing indentation of the #define.=C2=A0 The manual could mention that >> for C++, C++11 or later needs to be used to get the thread_local >> keyword (not the macro). > > Ack and I added a note on manual about C++11 requirement. Thanks.