Yann Bourrigault wrote:
.. For the moment I'll keep on working with the official release.

Sure.

Concerning this example, there is actually no clear statement in the C99 norm. 
My guess is that the size of the original type in which a bit-field is declared 
is only used to determine the alignment of the structure. In fact, some 
compilers allow to declare bit-fields with types smaller than int, which 
enables to have a different alignment for the structure. Considering promotion, 
the bit-field size should be taken as the actual type size, meaning that ufield 
must be considered as an uint7 instead of an uint32.
Thus, the rule "If an int can represent all values of the original type, the value 
is converted to an int." applies. Indeed, all the values stored in a uint7 may be 
stored in an int32, so the promotion is made on int.

Okay.

Actually the MS compilers seem to have a different notion of this (that
is the same as tcc, currently) but I think we are safe to assume that
gcc is right ;)

--- grischka



_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to