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
> On Wed, 6 Nov 2002, Jan Hubicka wrote:
>
> > Wed Nov 6 15:09:21 CET 2002 Jan Hubicka <jh@suse.cz>
> > * extend.texi (builtin functions) Document
> > floor, floorf, floorl, ceil, ceilf,
> > ceill, round, roundf, roundl, trunc,
> > truncf, truncl, rint, rintf, rintl.
>
> Some of these are C99-only (the round, trunc, rint functions I think; my
> copy of C90 isn't to hand right now). Note from comp.std.c and the WG14
> reflector that C90 is available for sale again from BSI, I recommend
> buying it. The C99-only nature of those built-in functions needs to be
> reflected in both the code and the docs.
I see. Man page claims:
CONFORMING TO
The floor() function conforms to SVID 3, POSIX, BSD 4.3, ISO
9899. The other functions are from C99.
So I will disable the builtins for non c++ except for floor, right?
>
> > functions except in strict ISO C90 mode. There are also built-in
> > versions of the ISO C99 functions @code{cosf}, @code{cosl},
> > @code{expf}, @code{expl}, @code{fabsf}, @code{fabsl},
> > ! @code{logf}, @code{logl}, @code{sinf}, @code{sinl}, @code{sqrtf}, @code{sqrtl}
> > ! @code{floorf}, @code{ceilf}, @code{roundf}, @code{trainf}, @code{rintf},
> > ! @code{floorl}, @code{ceill}, @code{roundl}, @code{trainl} and @code{rintl}
> > ! that are recognized in any mode since ISO C90 reserves
>
> "train" appears to be a typo here and below.
Thanks.
Honza
>
> --
> Joseph S. Myers
> jsm28@cam.ac.uk