[Icc-avr] Re: Casting (Morten Dramstad)
Johan Wallström
johan at edab.nu
Tue Jan 15 00:29:34 PST 2008
>>
>> *(int *)&data[7] = channelOne;
>>
>
> Just be careful to remember that this solution is non-portable - if you
> ever step up to a 16-bit or 32-bit cpu, you could get serious problems
> because of alignment issues.
>
Exactly, it looks very convenient and it's clear what it does, but 16/32-bit
systems often traps on that instruction.
cheers
Johan
More information about the Icc-avr
mailing list