public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/8204: gcj -O2 to native reorders certain instructions improperly.
@ 2003-03-24 15:16 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-03-24 15:16 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, java-prs, nobody, rsdio

Synopsis: gcj -O2 to native reorders certain instructions improperly.

State-Changed-From-To: feedback->open
State-Changed-By: bangerth
State-Changed-When: Mon Mar 24 15:16:42 2003
State-Changed-Why:
    Leave this to the Java experts

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8204


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: java/8204: gcj -O2 to native reorders certain instructions improperly.
@ 2003-03-22 18:09 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-03-22 18:09 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, java-prs, nobody, rsdio

Synopsis: gcj -O2 to native reorders certain instructions improperly.

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Sat Mar 22 18:09:51 2003
State-Changed-Why:
    In your code, you are modifying i twice in the same line:
      (f(s.charAt(i++)) << 4) | (f(s.charAt(i++))))
    I don't know enough about Java, but in C/C++ this will invoke
    undefined behavior, since the standard doesn't prescribe
    which of the two function calls happen first, and with
    which value of i. Is this different in Java, i.e. does
    the Java standard give guarantees as to the order in which
    the sub-statements are executed?
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8204


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-24 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-24 15:16 java/8204: gcj -O2 to native reorders certain instructions improperly bangerth
  -- strict thread matches above, loose matches on Subject: below --
2003-03-22 18:09 bangerth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).