This is the mail archive of the
frysk-bugzilla@sourceware.org
mailing list for the frysk project.
[Bug general/5971] New: Associativity of C operators
- From: "tthomas at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: frysk-bugzilla at sourceware dot org
- Date: 19 Mar 2008 16:11:04 -0000
- Subject: [Bug general/5971] New: Associativity of C operators
- Reply-to: sourceware-bugzilla at sourceware dot org
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.