[Icc-avr] Packing of variables in union
Albert van Veen
albert.vanveen at pertronic.co.nz
Mon May 21 13:01:33 PDT 2007
Hmmm, I've been pondering about this for a day (not fultime!), and must say:
if it really is bad programming, why does it exist? union that is.
Not that I want to be too philosophical about programming, but stil...
Albert.
-----Original Message-----
From: Johan H. Bodin [mailto:jh.bodin at telia.com]
Sent: Monday, 21 May 2007 7:38 p.m.
To: Discussion list for ICCAVR and ICCtiny Users. You do NOT need
tosubscribe to icc-announce if you are a member of this.
Subject: Re: [Icc-avr] Packing of variables in union
Hi John, Richard,
yes, I know it bad programming practice but I was a litlle bit
curious and I wanted to take a shortcut reusing some old code... ;-)
By the way, if I will ever need to port this code to a future big
endian 40-bit GigaAVR3000++ Super Turbo I will run into a few problems
anyway since 30% of the code is written in assembly language ;-)
Regards
Johan
Richard wrote:
> What John says, actually, the things that will break the code would be
> either a) the endianness change, or b) the alignment changes.
John Baraclough wrote:
>> Sorry, but that is very bad programming practice.
_______________________________________________
Icc-avr mailing list
Icc-avr at imagecraft.com
http://dragonsgate.net/mailman/listinfo/icc-avr
More information about the Icc-avr
mailing list