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: [PATCH]: convert (long)round(d) -> lround(d), etc


On Thu, Apr 29, 2004 at 09:37:35AM -0600, Tom Tromey wrote:
> >>>>> "Roger" == Roger Sayle <roger@eyesopen.com> writes:
> 
> Roger> My goof for not knowing this during review.  Indeed this change was
> Roger> made in order to better support the Java folks.  However, I'm also
> Roger> on Kaveh's side that perhaps the Java front-end should consider
> Roger> defining additional "C" types to assist the middle-end in performing
> Roger> this type of builtin optimization/transformation.
> 
> It seems to me that if these types are going to be used by the middle
> end, then we might as well define them in the generic part of gcc.

Worse, we'll be using libc "builtins" from Java.  So if Java naturally
defines "long" to the 64-bit type that the language defines, that'll be
wrong on i386 where the libc "long" is 32 bits.

Further still, I think it's silly that we require all languages to 
separately define all of the builtins we're defining that come from C.
If the middle end is going to want to transform one libc function to
another, then the middle end should build all of these function_decls.
That would sort of go hand-in-hand with redefining long_integer_type
to c_long_integer_type for these middle-end functions.


r~


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