C - warning: undefined behavior the order of volatile accesesisundefined in....
Fuzesi Arnold
arno at externet.hu
Fri Dec 16 09:24:46 CET 2005
----- Original Message -----
From: "Palasik Sandor" <palasik at mail.datanet.hu>
To: <elektro at tesla.hu>
Sent: Thursday, December 15, 2005 10:30 PM
Subject: Re: C - warning: undefined behavior the order of volatile
accesesisundefined in....
> Fuzesi Arnold wrote:
>> volatile uchar TxPacket[MAX_LENGTH + 7];
>> volatile uint spicmd;
>>
>> spicmd = Txreg_write_cmd | TxPacket[0];
>>
>>
>> warning: undefined behavior the order of volatile acceses is
>> undefined in this statament here
>>
>>
>> Mit akar ezzel mondani?
>
> Azt, hogy nézd meg az assembly kódot, hogy tetszik-e a volatile változók
> piszkálásának sorrendje :-)
Aha... :)
> Persze nehezen tudok nagyon különböző kódokat elképzelni ebből az
> utasításból. Azt azért jó lenne tudni, hogy a Txreg_write_cmd az
> egyáltalán
> változó-e, és ha igen, akkor volatile-e? Ha igen, akkor elvileg az első
Izé...#define
Arnold
More information about the Elektro
mailing list