From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37079 invoked by alias); 17 Feb 2020 12:25:21 -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 36970 invoked by uid 89); 17 Feb 2020 12:25:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: albireo.enyo.de From: Florian Weimer To: Samuel Thibault Cc: libc-alpha@sourceware.org, commit-hurd@gnu.org Subject: Re: [hurd,commited 2/2] x86 tls: Use _Static_assert for TLS access size assertion References: <20200217002010.541245-1-samuel.thibault@ens-lyon.org> <20200217002010.541245-2-samuel.thibault@ens-lyon.org> <87y2t1czz6.fsf@mid.deneb.enyo.de> <20200217115227.x3y6sqm6f7eg42gl@function> Date: Mon, 17 Feb 2020 12:25:00 -0000 In-Reply-To: <20200217115227.x3y6sqm6f7eg42gl@function> (Samuel Thibault's message of "Mon, 17 Feb 2020 12:52:27 +0100") Message-ID: <87mu9hcshk.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2020-02/txt/msg00751.txt.bz2 * Samuel Thibault: > Florian Weimer, le lun. 17 f=E9vr. 2020 10:41:49 +0100, a ecrit: >> > --- >> > sysdeps/i386/nptl/tls.h | 46 ++++++++++++++++-------------------- >> > sysdeps/mach/hurd/i386/tls.h | 46 ++++++++++++++++-------------------- >> > sysdeps/x86_64/nptl/tls.h | 46 ++++++++++++++++-------------------- >> > 3 files changed, 60 insertions(+), 78 deletions(-) >> > >> > diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h >> > index ffead90857..28053a77f3 100644 >> > --- a/sysdeps/i386/nptl/tls.h >> > +++ b/sysdeps/i386/nptl/tls.h >> > @@ -255,6 +255,9 @@ tls_fill_user_desc (union user_desc_init *desc, >> > /* Read member of the thread descriptor directly. */ >> > # define THREAD_GETMEM(descr, member) \ >> > ({ __typeof (descr->member) __value; \ >> > + _Static_assert (sizeof (__value) =3D=3D 1 \ >> > + || sizeof (__value) =3D=3D 4 \ >> > + || sizeof (__value) =3D=3D 8); \ >> > if (sizeof (__value) =3D=3D 1) \ >>=20 >> This (and the other changes) broke the x86_64-linux-gnu build. > > Uh? > > It built successfully on my box, I wonder what difference we have. I think single-argument _Static_assert is only available with GCC 9 and later.