From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88132 invoked by alias); 13 Jun 2018 22:58:44 -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 88123 invoked by uid 89); 13 Jun 2018 22:58:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Wed, 13 Jun 2018 22:58:00 -0000 From: Joseph Myers To: Tulio Magno Quites Machado Filho CC: , , Subject: Re: [PATCH 7/9] Refactor math-finite.h and introduce mathcalls-redir.h In-Reply-To: <878t7icqtd.fsf@linux.ibm.com> Message-ID: References: <20180606223909.16675-1-tuliom@linux.ibm.com> <20180606223909.16675-8-tuliom@linux.ibm.com> <878t7icqtd.fsf@linux.ibm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2018-06/txt/msg00373.txt.bz2 On Wed, 13 Jun 2018, Tulio Magno Quites Machado Filho wrote: > Yes, I can reproduce it in our tests if I replace -mlong-double-128 with > -mlong-double-64. > However, this is not user-visible because this warning is ignored in system > headers. > > Do you still think a bug report is necessary? I think we want to be clean with -Wsystem-headers; thus, there should be a bug report. > > Instead, I'd suggest merging bits/math-finite.h into bits/mathcalls.h as > > much as possible - have macros such as __MATHCALL_FINITE that are called > > in bits/mathcalls.h to declare the functions with __*_finite variants, and > > with __MATHCALL_FINITE defined the same as __MATHCALL when the finite > > function variants aren't in use. That way you have just a single > > redirection for each function. (You'll need a sysdeps bits/ header for an > > architecture, i.e. ia64, to declare it doesn't support the _finite > > functions at all.) > > It doesn't work well this way because we have prototypes with extra attributes, > e.g: > > __MATHDECL_1 (int, totalorder,, (_Mdouble_ __x, _Mdouble_ __y)) > __attribute__ ((__const__)); > > So, if I do not define __MATHDECL_1 in bits/math-finite.h, this code would end > up as an invalid code: > > __attribute__ ((__const__)); My proposal is that bits/math-finite.h either shouldn't exist or should end up just defining the lgamma / gamma / tgamma inlines. bits/mathcalls.h would be included once per type, with the macros definitions in effect when it's included depending on "defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0" (so if that's true some functions would be redirected to __*finite versions, if that's false it would behave much as it does at present). -- Joseph S. Myers joseph@codesourcery.com