This is the mail archive of the gcc@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: Question about fold_convert()


Tom Tromey wrote:-

> Anyway, I'd like to know what can be done.  I think we'd prefer to
> keep using the generic fold(), especially when compiling to native.
> (Though this is certainly up for reconsideration -- you tell me.)
> However, we'd like to be able to tweak it in some cases.
> 
> For 6391 I think we'd like a way to get fold_convert() to use Java
> semantics for real->int conversion.  How would I go about implementing
> this?  Would adding a new langhook be an acceptable approach?
> 
> For 6005 we'd like to just disable certain transformations when we're
> generating bytecode.  Again, is a langhook the best way?

I think what you describe is precisely what langhooks are for:
front-end specific handling within generic code.

Neil.


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