avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Understanding Problem or Error with ++ Operator


From: Dirk Hoffmann
Subject: [avr-gcc-list] Understanding Problem or Error with ++ Operator
Date: Fri, 8 Aug 2003 14:14:36 +0200

Hi folks,
I have a problem like this:
This code is working, as i expect, it adds one to CurSektor, 
void FAT_NextSektor ( unsigned long *CurCluster, unsigned long *CurSektor ) 
{
        [...]
        *CurSektor= *CurSektor+1;
        [...] 
}
But I wrote it before as:
void FAT_NextSektor ( unsigned long *CurCluster, unsigned long *CurSektor )
{
        [...]
        *CurSektor++;
        [...] 
}
This increments the pointer SurSektor by 4.
The same compiler output as CurSektor++;

Dirk Hoffmann

avr-gcc --version
avr-gcc (GCC) 3.3 20030421 (prerelease)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]