This is the mail archive of the
mailing list for the GCC project.
Re: Question about fold_convert()
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: GCC Hackers <gcc at gcc dot gnu dot org>
- Date: Sun, 12 May 2002 08:30:33 +0100
- Subject: Re: Question about fold_convert()
- References: <email@example.com>
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.