This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Builtins that don't work


PR 3474 is about a problem with __builtin_sqrtf on Solaris.  In particular,
if the call fails, we fall back to `sqrtf' -- but there is no such routine
on Solaris.  This shows up more now than it used to because V3 defines
sqrtf in terms of __builtin_sqrtf.

What should we do?  The easy thing is to just autoconf V3 to define
sqrtf in terms of sqrt if there is no sqrtf available; that's analagous
to what we already to for `tan', for example.

But, should we actually try to fix the underlying problem?  Either by
not recognizing the builtin on platforms that don't have the underlying
function, or by making the builtin perform the cast and calling `sqrt'?
I would favor not recognizing the builtin; otherwise, we are subtly
changing the semantics of the user's program.

Thoughts?

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


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