This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [3.4-BIB] Add trunc/round/floor/ceil/rint builtins II


> On Wed, Nov 06, 2002 at 10:54:05PM +0100, Jan Hubicka wrote:
> > + DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FLOOR,
> > + 		       "__builtin_floor",
> > + 		       BT_FN_DOUBLE_DOUBLE)
> 
> Surely this should be DEF_LIB_BUILTIN, since floor is in C90.
OK, I see now.  Should it use ATTR_CONST_NOTHROW_LIST?
> 
> > + DEF_C99_BUILTIN(BUILT_IN_CEIL,
> > + 		"__builtin_ceil",
> > + 		BT_FN_DOUBLE_DOUBLE)
> 
> I would be shocked if this didn't exist on a platform that did
> have floor, and thus I would think that we should be able to
> fall back on the libm version if the target doesn't support it.

I was wrong here. ceil is standard.
> 
> Do these show up as "foo" when !flag_iso?

Hmm, it seems to require flag_isoc99.

I will update the patch fith time :)

Honza


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