This is the mail archive of the 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: [PATCH, middle-end, commited]: Fix PR21282

On Tue, 3 May 2005, Uros Bizjak wrote:
> 2005-05-03  Uros Bizjak  <>
> 	PR middle-end/21282
> 	* convert.c (convert_to_integer): Convert ceil and floor in
> 	c99 mode only.

Hi Uros,

Whilst your patch is fine as written, it would be slightly better to
implement these checks as implicit_built_in_decls[fcode] != NULL_TREE
instead of just !TARGET_C99_FUNCTIONS.

TARGET_C99_FUNCTIONS is a very course grained macro to described the
available runtime library.  At some point in the future it may make
sense to refine this, and/or allow backends to specify that they have
the float versions of the math functions but not the long double versions,
or that they have sqrtf but not acosf, for example.  [Maybe even by
probing the target library with configure?]

The real test that we want here is not whether the target provides
the entirety of the C99 runtime, but specifically whether "floorf",
"floorl", "ceilf" or "ceill" is available, which is better done by
testing implicit_built_in_decls with the appropriate function code.

Admittedly, there is currently no or little difference between the
two approaches.  Just a suggestion for a small follow-up patch.


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