Re: Quick check on signed promotion of bytes



vippstar@xxxxxxxxx wrote:

Ah, I apologise, just something i am not sure about, char unsigned x,
y; means unsigned char x, 'plain' char y?

`char unsigned' means the same thing as `unsigned char';
the order of the keywords in a multi-keyword type specifier
doesn't matter. So `char unsigned x, y;' means the same thing
as `unsigned char x, y;' and gives both x and y the same type.

Win pocket money by writing `long int signed long x;'
or `double long y;' and betting the boys at the bar that
it's legal C.

--
Eric.Sosman@xxxxxxx

.



Relevant Pages

  • Re: 0 and all bits 0
    ... If it were `unsigned char c', ... An unsigned int may have padding bits. ... I'm not sure what you mean by "This doesn't matter?" ...
    (comp.lang.c)
  • Re: Why write putc(s.i16 & 0xff, fp);
    ... If the representation of negative integers isn't two's complement, ... then converting to unsigned char is different from discarding bits ... It doesn't matter. ...
    (comp.lang.c)