This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Builtins that don't work
- To: libstdc++ at gcc dot gnu dot org
- Subject: Builtins that don't work
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 19 Jul 2001 12:28:39 -0700
- cc: gcc at gcc dot gnu dot org
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