This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/28144] floating point constant -> byte/char/short conversion is wrong for java
- From: "joern dot rennecke at st dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2006 11:19:07 -0000
- Subject: [Bug tree-optimization/28144] floating point constant -> byte/char/short conversion is wrong for java
- References: <bug-28144-5394@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from joern dot rennecke at st dot com 2006-06-26 11:19 -------
Subject: Re: floating point constant -> byte/char/short conversion is wrong
for java
aph at gcc dot gnu dot org wrote:
>------- Comment #2 from aph at gcc dot gnu dot org 2006-06-26 09:45 -------
>Thank you for this patch.
>
>It seems to be a patch for the core constant folding code. Would it not be
>more
>appropriate to do this in the Java front end's function convert() (in
>java/typeck.c) ?
>
>
The current implementation has been patched allegedly for the benefit of
java, with the side effect of
giving different results between -O0 and -O1 for some (unspecified or
undefined) conversions for C/C++.
Having user bugs masked by -O0 makes debugging harder, so this is a
quality of implementation issue.
The proposed patch would also address this issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28144