From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14600 invoked by alias); 19 Mar 2008 16:11:48 -0000 Received: (qmail 14417 invoked by uid 48); 19 Mar 2008 16:11:04 -0000 Date: Wed, 19 Mar 2008 16:11:00 -0000 From: "tthomas at redhat dot com" To: frysk-bugzilla@sourceware.org Message-ID: <20080319161104.5971.tthomas@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug general/5971] New: Associativity of C operators X-Bugzilla-Reason: AssignedTo Mailing-List: contact frysk-bugzilla-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: frysk-bugzilla-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00620.txt.bz2 List-Id: Incorrect evaluation for C operators that associate right-to-left. Frysk: (fhpd) print i 1 (fhpd) print i++ + ++i + i 7 But on a GCC compiler: int i=1; printf ("%d\n", i++ + ++i + i); Output: 6 Gdb also seems to have this bug: (gdb) print i $2 = 1 (gdb) print i++ + ++i + i $3 = 7 -- Summary: Associativity of C operators Product: frysk Version: unspecified Status: NEW Severity: normal Priority: P2 Component: general AssignedTo: frysk-bugzilla at sourceware dot org ReportedBy: tthomas at redhat dot com OtherBugsDependingO 2246 nThis: http://sourceware.org/bugzilla/show_bug.cgi?id=5971 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.