From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74846 invoked by alias); 6 Jun 2018 23:23:31 -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 74823 invoked by uid 89); 6 Jun 2018 23:23:30 -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, 06 Jun 2018 23:23: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: <20180606223909.16675-8-tuliom@linux.ibm.com> Message-ID: References: <20180606223909.16675-1-tuliom@linux.ibm.com> <20180606223909.16675-8-tuliom@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/msg00130.txt.bz2 On Wed, 6 Jun 2018, Tulio Magno Quites Machado Filho wrote: > On a new enough compiler, redirecting the same function twice can cause > -Werror=pragmas errors. This issue may appear when redirecting an ISO C > floating point function to a different ABI at the same time that finite > redirections are expected. Does this issue already appear with -mlong-double-64? If so, it should definitely be separated out from this patch series and have a bug filed in Bugzilla as usual for anything fixing a bug that was user-visible in a release. The approach taken in this patch involves a lot of duplication of both function prototypes and the feature-test-macro conditions on when those functions are declared (duplicating them for functions not included in math-finite.h, when previously only those in math-finite.h had such duplication). Such duplication is, from experience, fragile and a bad idea; the conditions and declarations are too likely to get out of sync. 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.) -- Joseph S. Myers joseph@codesourcery.com