[Java] Call "fold" in convert_ieee_real_to_integer
Ranjit Mathew
rmathew@gmail.com
Fri Jul 23 14:58:00 GMT 2004
On Wed, 21 Jul 2004 15:23:06 -0600 (MDT), Roger Sayle
<roger@eyesopen.com> wrote:
>
> On Wed, 21 Jul 2004, Ranjit Mathew wrote:
> > No, "case (int)Float.NaN:" also doesn't work.
>
> Hi Ranjit,
>
> Could you check whether the patch below cures the recent JACKS
> failures (and "case (int)Float.Nan") for you?
>
> This following patch has been tested on i686-pc-linux-gnu, with a full
> "make bootstrap", all default languages including java, and regression
> tested with a top-level "make -k check" with no new failures.
>
> Ok for mainline if this fixes Ranjit's problems?
Thanks a tonne for looking into this Roger!
Unfortunately, there still is some problem and
quite curiously, the behaviour is different for "-C"
(generate Java bytecode) and "-fsyntax-only"
and "-c" (generate object code) as can be
seen from the following:
---------------- 8< ----------------
~/tmp > cat X.java
public class X
{
public void foo( int i)
{
switch(i)
{
case ((int )Float.NaN == 0 ? 1 : 0): break;
case (int )Float.NaN: break;
}
}
}
~/tmp > $MYGCJ -fsyntax-only X.java
~/tmp > $MYGCJ -c X.java
~/tmp > $MYGCJ -C X.java
X.java: In class `X':
X.java: In method `X.foo(int)':
X.java:8: error: duplicate case label: `0'.
case (int )Float.NaN: break;
^
X.java:7: error: original label is here.
case ((int )Float.NaN == 0 ? 1 : 0): break;
^
2 errors
~/tmp >
---------------- 8< ----------------
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/
More information about the Java-patches
mailing list