From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 240F13858022 for ; Tue, 4 Oct 2022 21:20:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 240F13858022 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664918440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXqBFU247NLiIALmiXH8plvVLujDxVTgtVvxiTV5LsA=; b=MpLaJizng05j1mdXud9pv9CaFaeqYgCugf6Pu9f+1UCF5LOx8JSjWOklxvQuYChuedKjer hz06Sdx6GbKK+7sEn68bQWglaR2xrPf+D8K0QduN5hXhV14iAd+LHRfx7A6uf7ypo5HfZP Vx0E3LPvwN22PqD8kD1MIdrvChPV3cM= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-385-7xj6_gCQOg6TkukqKsgfAA-1; Tue, 04 Oct 2022 17:20:32 -0400 X-MC-Unique: 7xj6_gCQOg6TkukqKsgfAA-1 Received: by mail-qv1-f71.google.com with SMTP id c1-20020a0cfb01000000b00495ad218c74so9676214qvp.20 for ; Tue, 04 Oct 2022 14:20:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=yXqBFU247NLiIALmiXH8plvVLujDxVTgtVvxiTV5LsA=; b=GuLkmBPWGGndnQf4kTxFzwZXqHqrEfzP8av/dczqEoKtKMRBmt+83ObfzTgaIW6hMp 8d+NtmKKq2wcfTJWvfNChIy4R+TMSBMRUJkapQLhiqlRtFqHUT7MYdVNqt0zA+3BqnMU aKURMVT/2SNPydLSnN+NSu/51XOr6o2AvjXbbKKfwb400nx5wm3miWcTH9qRV+8E4yJm 9LY1xMxtVHLCQKYa+1nVupdTnXI/9Otq9W1WxKrRvTCqkypjR+a3qyMLiiaykLz9zagG 5IQQryf31MxOSH0+0lPS3zCn9Q0kfe+spMxNX2LkdvIYi7wVEjD7XnSQLNHNmhMlgxz2 IdlA== X-Gm-Message-State: ACrzQf069fNfV0Vo8BXuwsp7qH5NrP1iEHx1TQbcbGHC/QHTq6fOT/rV 9cFD+atPZBGJ1Dgm2e+noKHUAQkWGBO9wKmK/vRdj8RRDQtU1A0SZmFgUo6SFDwdQxTnNqPWOLp wZwL2o1wfN1KPbl8cMg== X-Received: by 2002:a05:6214:29c5:b0:4b1:9c45:c6dc with SMTP id gh5-20020a05621429c500b004b19c45c6dcmr7100011qvb.2.1664918432011; Tue, 04 Oct 2022 14:20:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UVanhkQT/udrXT7vr/9DjMOr6R7xr0caaPn9aPjW/z5TTX2h3tJsAZj5+y0vtDaE6NN0Wtw== X-Received: by 2002:a05:6214:29c5:b0:4b1:9c45:c6dc with SMTP id gh5-20020a05621429c500b004b19c45c6dcmr7099998qvb.2.1664918431651; Tue, 04 Oct 2022 14:20:31 -0700 (PDT) Received: from [192.168.1.101] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id l29-20020a37f91d000000b006cf19068261sm15171359qkj.116.2022.10.04.14.20.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Oct 2022 14:20:31 -0700 (PDT) Message-ID: Date: Tue, 4 Oct 2022 17:20:30 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH] fixincludes: Deal also with the _Float128x cases [PR107059] To: Jakub Jelinek , Joseph Myers , Bruce Korb , gcc-patches@gcc.gnu.org References: From: Jason Merrill In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 9/30/22 03:20, Jakub Jelinek wrote: > On Wed, Sep 28, 2022 at 08:19:43PM +0200, Jakub Jelinek via Gcc-patches wrote: >> Another case are the following 3 snippets: >> # if !__GNUC_PREREQ (7, 0) || defined __cplusplus >> # error "_Float128X supported but no constant suffix" >> # else >> # define __f128x(x) x##f128x >> # endif >> ... >> # if !__GNUC_PREREQ (7, 0) || defined __cplusplus >> # error "_Float128X supported but no complex type" >> # else >> # define __CFLOAT128X _Complex _Float128x >> # endif >> ... >> # if !__GNUC_PREREQ (7, 0) || defined __cplusplus >> # error "_Float128x supported but no type" >> # endif >> but as no target has _Float128x right now and don't see it >> coming soon, it isn't a big deal (on the glibc side it is of >> course ok to adjust those). > > This incremental patch deals handles the above 3 cases, so we > fixinclude what glibc itself changed too. > > Bootstrapped/regtested on x86_64-linux and i686-linux (together with the > previously posted fixincludes/ change too), ok for trunk? Both OK on Friday if no comments before then. > 2022-09-30 Jakub Jelinek > > PR bootstrap/107059 > * inclhack.def (glibc_cxx_floatn_5): New. > * fixincl.x: Regenerated. > * tests/base/bits/floatn.h: Regenerated. > > --- fixincludes/inclhack.def.jj 2022-09-29 22:18:47.974402688 +0200 > +++ fixincludes/inclhack.def 2022-09-29 22:22:48.151145670 +0200 > @@ -2131,6 +2131,23 @@ fix = { > EOT; > }; > > +fix = { > + hackname = glibc_cxx_floatn_5; > + files = bits/floatn.h, bits/floatn-common.h, "*/bits/floatn.h", "*/bits/floatn-common.h"; > + select = "^([ \t]*#[ \t]*if !__GNUC_PREREQ \\(7, 0\\) \\|\\| )defined __cplusplus\n" > + "([ \t]*#[ \t]+error \"_Float128[xX] supported but no )"; > + c_fix = format; > + c_fix_arg = "%1(defined __cplusplus && !__GNUC_PREREQ (13, 0))\n%2"; > + test_text = <<-EOT > + # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > + # error "_Float128X supported but no constant suffix" > + # endif > + # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > + # error "_Float128x supported but no type" > + # endif > + EOT; > +}; > + > /* glibc-2.3.5 defines pthread mutex initializers incorrectly, > * so we replace them with versions that correspond to the > * definition. > --- fixincludes/fixincl.x.jj 2022-09-29 22:18:47.975402675 +0200 > +++ fixincludes/fixincl.x 2022-09-29 22:22:55.675909244 +0200 > @@ -2,11 +2,11 @@ > * > * DO NOT EDIT THIS FILE (fixincl.x) > * > - * It has been AutoGen-ed September 28, 2022 at 07:56:15 PM by AutoGen 5.18.16 > + * It has been AutoGen-ed September 29, 2022 at 10:22:55 PM by AutoGen 5.18.16 > * From the definitions inclhack.def > * and the template file fixincl > */ > -/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Sep 28 19:56:15 CEST 2022 > +/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Sep 29 22:22:55 CEST 2022 > * > * You must regenerate it. Use the ./genfixes script. > * > @@ -15,7 +15,7 @@ > * certain ANSI-incompatible system header files which are fixed to work > * correctly with ANSI C and placed in a directory that GNU C will search. > * > - * This file contains 271 fixup descriptions. > + * This file contains 272 fixup descriptions. > * > * See README for more information. > * > @@ -4273,6 +4273,43 @@ static const char* apzGlibc_Cxx_Floatn_4 > > /* * * * * * * * * * * * * * * * * * * * * * * * * * > * > + * Description of Glibc_Cxx_Floatn_5 fix > + */ > +tSCC zGlibc_Cxx_Floatn_5Name[] = > + "glibc_cxx_floatn_5"; > + > +/* > + * File name selection pattern > + */ > +tSCC zGlibc_Cxx_Floatn_5List[] = > + "bits/floatn.h\0bits/floatn-common.h\0*/bits/floatn.h\0*/bits/floatn-common.h\0"; > +/* > + * Machine/OS name selection pattern > + */ > +#define apzGlibc_Cxx_Floatn_5Machs (const char**)NULL > + > +/* > + * content selection pattern - do fix if pattern found > + */ > +tSCC zGlibc_Cxx_Floatn_5Select0[] = > + "^([ \t]*#[ \t]*if !__GNUC_PREREQ \\(7, 0\\) \\|\\| )defined __cplusplus\n\ > +([ \t]*#[ \t]+error \"_Float128[xX] supported but no )"; > + > +#define GLIBC_CXX_FLOATN_5_TEST_CT 1 > +static tTestDesc aGlibc_Cxx_Floatn_5Tests[] = { > + { TT_EGREP, zGlibc_Cxx_Floatn_5Select0, (regex_t*)NULL }, }; > + > +/* > + * Fix Command Arguments for Glibc_Cxx_Floatn_5 > + */ > +static const char* apzGlibc_Cxx_Floatn_5Patch[] = { > + "format", > + "%1(defined __cplusplus && !__GNUC_PREREQ (13, 0))\n\ > +%2", > + (char*)NULL }; > + > +/* * * * * * * * * * * * * * * * * * * * * * * * * * > + * > * Description of Glibc_Mutex_Init fix > */ > tSCC zGlibc_Mutex_InitName[] = > @@ -11038,9 +11075,9 @@ static const char* apzX11_SprintfPatch[] > * > * List of all fixes > */ > -#define REGEX_COUNT 309 > +#define REGEX_COUNT 310 > #define MACH_LIST_SIZE_LIMIT 187 > -#define FIX_COUNT 271 > +#define FIX_COUNT 272 > > /* > * Enumerate the fixes > @@ -11147,6 +11184,7 @@ typedef enum { > GLIBC_CXX_FLOATN_2_FIXIDX, > GLIBC_CXX_FLOATN_3_FIXIDX, > GLIBC_CXX_FLOATN_4_FIXIDX, > + GLIBC_CXX_FLOATN_5_FIXIDX, > GLIBC_MUTEX_INIT_FIXIDX, > GLIBC_STDINT_FIXIDX, > GLIBC_STRNCPY_FIXIDX, > @@ -11825,6 +11863,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { > GLIBC_CXX_FLOATN_4_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, > aGlibc_Cxx_Floatn_4Tests, apzGlibc_Cxx_Floatn_4Patch, 0 }, > > + { zGlibc_Cxx_Floatn_5Name, zGlibc_Cxx_Floatn_5List, > + apzGlibc_Cxx_Floatn_5Machs, > + GLIBC_CXX_FLOATN_5_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, > + aGlibc_Cxx_Floatn_5Tests, apzGlibc_Cxx_Floatn_5Patch, 0 }, > + > { zGlibc_Mutex_InitName, zGlibc_Mutex_InitList, > apzGlibc_Mutex_InitMachs, > GLIBC_MUTEX_INIT_TEST_CT, FD_MACH_ONLY, > --- fixincludes/tests/base/bits/floatn.h.jj 2022-09-29 22:18:47.976402661 +0200 > +++ fixincludes/tests/base/bits/floatn.h 2022-09-29 22:23:19.703717787 +0200 > @@ -84,3 +84,13 @@ typedef long double _Float128; > # define __CFLOAT128 _Complex long double > # endif > #endif /* GLIBC_CXX_FLOATN_4_CHECK */ > + > + > +#if defined( GLIBC_CXX_FLOATN_5_CHECK ) > +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) > +# error "_Float128X supported but no constant suffix" > +# endif > +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) > +# error "_Float128x supported but no type" > +# endif > +#endif /* GLIBC_CXX_FLOATN_5_CHECK */ > > > Jakub >