Herbert Graf email (remove spam text)
On Wed, 2008-07-09 at 18:03 +0100, Alan B. Pearce wrote:
> >1) PORTA is an unsigned char. Therefore, before we can take
> >its complement, it must be promoted to signed int.
> What a load of rubbish. There is no 'must be promoted' at all. There is no
> reason to promote an unsigned char to signed int.
FWIW most of this thread has been mostly over my head (never took a
course on compiler design, always been more into the hardware...).
That said, I am interested in the "integer promotion". What ARE the
rules for promotion? I have been hit a couple times with promotion
happening when I didn't think it would, and other times not happening
when I thought it should have.
What are common "gotchas" with regards to type promotion?
Since I'm not that familiar with the rules, I generally explicitly cast
so that I don't have to worry about them, but now I'm curious! :)
In reply to: <email@example.com>
See also: www.piclist.com/techref/index.htm?key=code+packing
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the