java/1401
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Sun Apr 1 00:00:00 GMT 2001
The following reply was made to PR java/1401; it has been noted by GNATS.
From: Bryce McKinlay <bryce@waitaki.otago.ac.nz>
To: apbianco@gcc.gnu.org, gcc-gnats@gcc.gnu.org, tromey@redhat.com
Cc:
Subject: Re: java/1401
Date: Sat, 03 Mar 2001 20:04:38 +1300
> From: Alexandre Petit-Bianco
> To: java-gnats@sourceware.cygnus.com
> Cc:
> Subject: Re: gcj/371: += semantics not correct
> Date: Sun, 19 Nov 2000 22:22:40 -0800 (PST)
>
> tromey@redhat.com writes:
>
> > Consider the program below. It prints `2'. However, it should
> > print `1'. The problem is that we evaluate the left-hand side of
> > the `+=' twice, contradicting JLS 15.26.2. Maybe using a SAVE_EXPR
> > in build_assignment() would be good enough?
>
> Most likely. Note that this could be a regression -- we spent quite
> some time in the past getting these cases right but it might have
> broken again at some point :-(
>
This problem only occurs when compiling to bytecode. I'm updating the
synopsis to
reflect that.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1401&database=gcc
More information about the Gcc-prs
mailing list