[Bug c/16887] New: Bad assignment in "int i=1; i=i++;"
krs at home dot se
gcc-bugzilla@gcc.gnu.org
Thu Aug 5 14:10:00 GMT 2004
gcc -v:
Reading specs from /opt/GCC341/lib/gcc/sparc-sun-solaris2.6/3.4.1/specs
Configured with: ../gcc-3.4.1/configure --prefix=/opt/GCC341 --with-as=/usr/ccs/bin/as --with-
ld=/usr/ccs/bin/ld --disable-libgcj --enable-languages=c,c++,objc
Thread model: posix
gcc version 3.4.1
uname -srv:
SunOS 5.6 Generic_105181-11
Comments:
The not normally used expression:
int i=1;
i=i++;
will yield i==1, but should yield i==2.
This does not occur in GCC v.2.8.1 nor in Microsoft VC++.
Could be a problem in another assignment situations
--
Summary: Bad assignment in "int i=1; i=i++;"
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: krs at home dot se
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16887
More information about the Gcc-bugs
mailing list