On Mon, Jul 08, 2013 at 09:47:10AM +0200, Kurt Van Dijck wrote:
> Hello,
> 
> I just remembered this thing from an embedded 16bit CPU.
> 
> Why would you do
>       unsigned char XXX :1
> and not
>       unsigned int XXX :1
> 
> I think the latter may benefit code size (a tiny bit)
> because it avoids an integer promotion, at least on some platforms.

unsigned char is directly incorrect and a gnu extension. Bitfields must be
integers o bool (since c99). You can see it with 'gcc -std=c99 -pedantic'.

Best regards,



Reply via email to