This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/25206] New: for loop with comma operator problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]