This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.4-BIB] Add trunc/round/floor/ceil/rint builtins II
> On Wed, Nov 06, 2002 at 11:52:33PM +0100, Jan Hubicka wrote:
> > + DEF_LIB_BUILTIN(BUILT_IN_FLOOR,
> > + "__builtin_floor",
> > + BT_FN_DOUBLE_DOUBLE,
> > + ATTR_CONST_NOTHROW_LIST)
> > + DEF_LIB_BUILTIN(BUILT_IN_FLOORF,
> > + "__builtin_floorf",
> > + BT_FN_FLOAT_FLOAT,
> > + ATTR_CONST_NOTHROW_LIST)
>
> Well, see, C90 does have floor, but not floorf, IIRC.
> Unfortunately I seem to have misplaced my C90 book,
> so I can't check at the moment. :-(
They are same category as fabsl - not defined behaviour in C90 but
reserved names, so we can safely define these in C99 way.
>
> So the -f and -l forms need to be DEF_C99_BUILTIN as well.
>
> Also, it would be a Good Thing if DEF_C99_BUILTIN took an
> ATTRS parameter as well, since ATTR_CONST_NOTHROW_LIST is
> correct for all of these.
I can add this in next patch. Or should I include that?
Honza
>
>
> r~