https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28144

Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2016-03-08
         Resolution|INVALID                     |---
     Ever confirmed|0                           |1

--- Comment #7 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
PR 27394 was closed on the grounds that the code was exhibited undefined
behaviour and that alternate facilities had been added in the meantime
which mitigate the impact of the inconsistent implemented behaviour on
debugging.

However, this PR (28144) is about the impact on Java; an updated link
to the quoted spec above is:

http://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.1.3

where it defines the exact behaviour of conversions.

The comment at the start of fold_convert_const_int_from_real 
claims that the code implements the floating point to integer
conversion rules required by the Java Language Specification,
but due to the problem discussed here, that is not true when
it comes to conversion to types narrower than int.

Reply via email to