[En-Nut-Discussion] Hardware Register Access Using Volatile Pointer
Harald Kipp
harald.kipp at egnite.de
Tue Apr 26 09:33:26 CEST 2011
Hi Ulrich,
On 4/25/2011 11:44 PM, Ulrich Prinz wrote:
>>
>> PS: reading into a dummy variable won't help, since the compiler is
>> free to optimze dummy (and even real) variable away.
>>
> In addition newer versions of gcc will throw a warning "Variable
> declared and set is not evaluated" or something similar.
That's the origin of the problem. Michael Fischer asked me to fix a few
warnings when compiling the trunk with GCC 4.6. It turned out to become
a bit more difficult than expected. The first warning appeared at
arch/arm/dev/ostimer_at91.c:
int dummy;
...
dummy = inr(TC0_SR);
Regards,
Harald
More information about the En-Nut-Discussion
mailing list