From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12435 invoked by alias); 22 Mar 2003 18:09:52 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 12406 invoked by uid 48); 22 Mar 2003 18:09:52 -0000 Date: Sat, 22 Mar 2003 18:09:00 -0000 Message-ID: <20030322180952.12405.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, java-prs@gcc.gnu.org, nobody@gcc.gnu.org, rsdio@metastatic.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, java-prs@gcc.gnu.org, nobody@gcc.gnu.org, rsdio@metastatic.org, gcc-gnats@gcc.gnu.org Subject: Re: java/8204: gcj -O2 to native reorders certain instructions improperly. X-SW-Source: 2003-03/txt/msg01496.txt.bz2 List-Id: 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