Release: gcc version 2.95.3 20010315 (release) Environment: SuSE Linux 7.0 (for Sparc) SUN UltraSparc 1 170 How-To-Repeat: #include <stdio.h> int main() { int a = 10, b = 15; a = a++ + b; printf("%d\n", a); return 0; }
Fix: lets compile with optimization flags (-O1, -O2, -O3)
State-Changed-From-To: open->closed State-Changed-Why: Not a bug in gcc. The program's behaviour is undefined; "a" is modified twice without a sequence point in between.
From: bernds@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, mikaldaz@unavarra.es, nobody@gcc.gnu.org Cc: Subject: Re: c/2550 Date: 17 Apr 2001 12:11:13 -0000 Synopsis: postfix ++ doesn't work State-Changed-From-To: open->closed State-Changed-By: bernds State-Changed-When: Tue Apr 17 05:11:12 2001 State-Changed-Why: Not a bug in gcc. The program's behaviour is undefined; "a" is modified twice without a sequence point in between. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2550&database=gcc
Reopening to ...
Mark as a dup of bug 11751. *** This bug has been marked as a duplicate of 11751 ***