This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to categorize builtins.def
- From: Roger Sayle <roger at eyesopen dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, <zack at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 2 Aug 2003 11:34:29 -0600 (MDT)
- Subject: Re: Patch to categorize builtins.def
Hi Gaby,
> | Does anyone have any objections, if Kaveh and I agree upon the semantics
> | of *always* disabling library builtin expansion at -O0, which would
>
> Pardon the trivial question, but: Is __builtin_powi considered a
> library built-in?
A good question. No, __builtin_powi would be a DEF_GCC_BUILTIN as there
isn't currently a "powi" API in libc (atleast according to ISO, glibc
and newlib). i.e. there isn't a library function to fallback to (yet).
But the issue it raises is a good one. This is by accident rather than
by design. However, if glibc/libc did provide a powi, it wouldn't be
unreasonable to call it at -O0 from the current places we're considering
using __builtin_powi. i.e. it could then become a DEF_EXT_BUILTIN.
Looking further ahead this also suggests a future where configure tests
on the target could be used to populate implicit_built_in_decls...
Roger
--