------- 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