From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41055 invoked by alias); 1 Mar 2018 19:10:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 41046 invoked by uid 89); 1 Mar 2018 19:10:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,T_FILL_THIS_FORM_SHORT,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Mar 2018 19:10:30 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 74CA7404084B; Thu, 1 Mar 2018 19:10:18 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-85.brq.redhat.com [10.40.204.85]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB6F510B0F24; Thu, 1 Mar 2018 19:10:09 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w21JA6DY011212; Thu, 1 Mar 2018 20:10:07 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w21JA38o011211; Thu, 1 Mar 2018 20:10:03 +0100 Date: Thu, 01 Mar 2018 19:10:00 -0000 From: Jakub Jelinek To: Tulio Magno Quites Machado Filho , Michael Meissner Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org, wschmidt@linux.vnet.ibm.com, segher@kernel.crashing.org Subject: Re: [PATCH] PR libstdc++/84654 Do not use __float128 if it is disabled by the compiler Message-ID: <20180301191003.GR5867@tucnak> Reply-To: Jakub Jelinek References: <20180301184719.16691-1-tuliom@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180301184719.16691-1-tuliom@linux.vnet.ibm.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00047.txt.bz2 On Thu, Mar 01, 2018 at 03:47:19PM -0300, Tulio Magno Quites Machado Filho wrote: > In order to use the __float128 in C++ it's necessary to check if > it is supported in libstdc++ (i.e. via _GLIBCXX_USE_FLOAT128) and if the > compiler enabled its support too, e.g. -mfloat128 or -mno-float128. > > 2018-03-01 Tulio Magno Quites Machado Filho Two spaces between date and name and name and email address. > PR libstdc++/84654 > * include/bits/std_abs.h: Avoid to use __float128 when the > compiler disabled it. > * include/std/type_traits: Likewise. That is incorrect. Only powerpc* defines __FLOAT128__ macro, but it isn't the only one with __float128 type, e.g. x86_64-linux provides __float128 too, but doesn't define __FLOAT128__. On x86_64-linux one can check for defined(__SIZEOF_FLOAT128__) instead. One could argue that what powerpc does is wrong, defining __SIZEOF_*__ is consistent with all the other __SIZEOF_*__ macros. Also (up to libstdc++ maintainers) I'd say that _GLIBCXX_USE_FLOAT128 macro should depend on this macro, rather than uglifying all the uses. So, #undef somewhere _GLIBCXX_USE_FLOAT128 if __SIZEOF_FLOAT128__ is not defined. Jakub