This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 7/9] Refactor math-finite.h and introduce mathcalls-redir.h


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]