c/2550: postfix ++ doesn't work
mikaldaz@unavarra.es
mikaldaz@unavarra.es
Sat Apr 14 06:06:00 GMT 2001
>Number: 2550
>Category: c
>Synopsis: postfix ++ doesn't work
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Sat Apr 14 06:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Mikel ALDAZ-ZARAGUETA
>Release: gcc version 2.95.3 20010315 (release)
>Organization:
>Environment:
SuSE Linux 7.0 (for Sparc)
SUN UltraSparc 1 170
>Description:
>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)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list