This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25206] New: for loop with comma operator problem
- From: "ymonyak at lipowsky dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Dec 2005 14:46:37 -0000
- Subject: [Bug c/25206] New: for loop with comma operator problem
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC 4.0.1 bilt by GNUARM.
follow source has different read and store address by incrementing of "n".
As result variable "n" will be not changed.
unsigned short CommTxNum;
static void foo (void) __attribute__ ((interrupt ("IRQ")));
void foo(void)
{
unsigned char n;
for (n = 0; n < 3 && CommTxNum; n++, CommTxNum++)
{
...
}
}
--
Summary: for loop with comma operator problem
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ymonyak at lipowsky dot de
GCC build triplet: 4.0.1
GCC host triplet: windows2000 sygwin
GCC target triplet: arm-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25206