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 DF3B53858016 for ; Wed, 28 Sep 2022 18:28:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF3B53858016 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=1664389690; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=f/iUd418elT/Cy49qdQrk50yCYCzclA25SHC3MpT/zs=; b=e2dg4q+xCrGS8FeP5aohAcY13viGgqkWXZmXGhaOvHQOOlsXWmONHbjPvNCoToJYbXvYIV 7xyRrdi95aKGsPSZKJ6PN4mUG3fR0ewv2DH05Y/wpjzaOhy9MmpeOqjNx/14naS8cvM6FK EVZ62dJcXtlp0N6irs5MoTGD/gKXaZg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-451-L-ffqK1qNG2fLBpoqR_7Nw-1; Wed, 28 Sep 2022 14:28:09 -0400 X-MC-Unique: L-ffqK1qNG2fLBpoqR_7Nw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E6B0329DD999; Wed, 28 Sep 2022 18:28:08 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.194]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A7644492B04; Wed, 28 Sep 2022 18:28:08 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 28SIS0qO3884738 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 28 Sep 2022 20:28:01 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 28SIS0cT3884737; Wed, 28 Sep 2022 20:28:00 +0200 Date: Wed, 28 Sep 2022 20:28:00 +0200 From: Jakub Jelinek To: Joseph Myers Cc: libc-alpha@sourceware.org Subject: Re: Update _FloatN header support for C++ in GCC 13 Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,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 Wed, Sep 28, 2022 at 12:23:31AM +0000, Joseph Myers wrote: > GCC 13 adds support for _FloatN and _FloatNx types in C++, so breaking > the installed glibc headers that assume such support is not present. > GCC mostly works around this with fixincludes, but that doesn't help > for building glibc and its tests (glibc doesn't itself contain C++ > code, but there's C++ code built for tests). Update glibc's > bits/floatn-common.h and bits/floatn.h headers to handle the GCC 13 > support directly. > > In general the changes match those made by fixincludes, though I think > the ones in sysdeps/powerpc/bits/floatn.h, where the header tests > __LDBL_MANT_DIG__ == 113 or uses #elif, wouldn't match the existing > fixincludes patterns. > > Some places involving special C++ handling in relation to _FloatN > support are not changed. There's no need to change the > __HAVE_FLOATN_NOT_TYPEDEF definition (also in a form that wouldn't be > matched by the fixincludes fixes) because it's only used in relation > to macro definitions using features not supported for C++ > (__builtin_types_compatible_p and _Generic). And there's no need to > change the inline function overloads for issignaling, iszero and > iscanonical in C++ because cases where types have the same format but > are no longer compatible types are handled automatically by the C++ > overload resolution rules. > > This patch also does not change the overload handling for iseqsig, and > there I think changes *are* needed, beyond those in this patch or made > by fixincludes. The way that overload is defined, via a template > parameter to a structure type, requires overloads whenever the types > are incompatible, even if they have the same format. So I think we > need to add overloads with GCC 13 for every supported _FloatN and > _FloatNx type, rather than just having one for _Float128 when it has a > different ABI to long double as at present (but for older GCC, such > overloads must not be defined for types that end up defined as > typedefs for another type). > > Tested with build-many-glibcs.py: compilers build for > aarch64-linux-gnu ia64-linux-gnu mips64-linux-gnu powerpc-linux-gnu > powerpc64le-linux-gnu x86_64-linux-gnu; glibcs build for > aarch64-linux-gnu ia64-linux-gnu i686-linux-gnu mips-linux-gnu > mips64-linux-gnu-n32 powerpc-linux-gnu powerpc64le-linux-gnu > x86_64-linux-gnu. > > --- > > I am seeking review of this patch, not applying it as a math > maintainer. Went through all these and compared them to my include-fixed of whole libc tree and the only changes are the _Float128x errors which is desirable. So, LGTM. Reviewed-by: Jakub Jelinek Jakub