[Bug c/12552] New: Problem with increment operator gcc/g++
devnull at frogshit dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 9 16:27:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12552
Summary: Problem with increment operator gcc/g++
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: devnull at frogshit dot com
CC: gcc-bugs at gcc dot gnu dot org
% more price.c
#include <stdio.h>
int main()
{
int price = 10;
int cost = price++ + ++price;
printf("%d\n", cost);
return 0;
}
% gcc price.c
% ./a.out
21
% gcc -O price.c
% ./a.out
22
I reported this error once before, back in the 2.95 days, I think.
More information about the Gcc-bugs
mailing list