This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/25206] for loop with comma operator problem
- From: "efim 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 15:55:08 -0000
- Subject: [Bug middle-end/25206] for loop with comma operator problem
- References: <bug-25206-11799@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from efim at lipowsky dot de 2005-12-01 15:55 -------
Subject: Re: for loop with comma operator problem
pinskia at gcc dot gnu dot org schrieb:
>------- Comment #1 from pinskia at gcc dot gnu dot org 2005-12-01 15:28 -------
>HUH? Can you give the full source/ reduced source and give a little more
>detailed explication on what is going wrong.
>
>
>
>
in the file you can see a snapshort with two arrows to read and store
addresses.
It is very simple source.
static BYTE CommTxBuf[COMM_BUF_SIZE];
static BYTE * CommTxBufHead = CommTxBuf;
static BYTE * CommTxBufTail = CommTxBuf;
static WORD CommTxNum = 0;
static void comm_txisr (void) __attribute__ ((interrupt ("IRQ")));
static void comm_txisr(void)
{
DWORD tmp;
BYTE n;
if(CommTxNum)
{
tmp = 0;
for (n = 0; n < 3 && CommTxNum; n++, CommTxNum--)
{
tmp |= (DWORD)(*CommTxBufTail) << ((n + 1) * 8);
if (++CommTxBufTail >= &CommTxBuf[COMM_BUF_SIZE])
CommTxBufTail = CommTxBuf;
}
tmp |= (DWORD)n;
while (comm_putchar(tmp))
;
}
VICVectAddr = 0; // Update VIC priorities
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25206