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]

Question about fold_convert()


Today I looked at PR 6391.  Basically it turns out to be a mismatch
between fold_convert() and Java.  fold_convert handles real constants
one way, while Java specifies a different way.

This sort of thing shows up occasionally; for another example see PR
6005.  I'm sure there are more examples, but I don't have a list.

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?

If not a langhook, then what?

Tom


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