This is the mail archive of the libc-alpha@sources.redhat.com 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]

Re: Implementation of <tgmath.h>


On Fri, Jul 28, 2000 at 08:47:26PM +0100, Joseph S. Myers wrote:
> The best suggestion I have for a compiler extension to allow a correct
> implementation would be a series of builtin functions corresponding to
> the glibc macros, so that for example
> 
> #define expm1(Val) __builtin_tgmath_unary_real_only(Val, expm1f, expm1, \
> 						    expm1l)
> 
> would have the compiler create a call to the appropriate one of expm1f,
> expm1, expm1l according to the type of Val and the rules of <tgmath.h>
> when it sees a call to __builtin_tgmath_unary_real_only.

Ug.  This would seem to need the addition of mini-templates to 
the C front end. 

OTOH, the IA-64 abi has some builtin functions that could benefit
from this.  At present we implement two separate builtins and
play header file tricks to try and make it come out right.


r~

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