J
Jens Gustedt
Am 28.08.2012 22:56, schrieb James Kuyper:
Effectively, I read this phrase
The order of allocation of bit-fields within a unit (high-order to
low-order or low-order to high-order) is implementation-defined.
that an implementation would have to choose one of the orderings once
and for all and apply this to all cases consistently.
But it seems that interpreting such text then becomes more a question
of English skills than of anything else.
If in fact, people are interpreting this differently in the sense that
"given storage location X here is an algorithm to determine the
ordering" is sufficient as defintion for an implementation, and so
allowing for a determination of that ordering from location of the
storage unit inside a bigger unit and stuff like that, then
no
and then it would need more precision. But my English is probably not
good enough to be capable to make a proposal that is better than the
existing text, then.
Jens
On 08/28/2012 04:36 PM, Jens Gustedt wrote:
You won't be happy. "in-order" has two different possible meanings, and
each implementation has the option of choosing either one. Both C and
C++ are in agreement on this. Different implementations for the same
platform could make different choices (though market forces make that
unlikely); a single implementation could even make it a command-line option.
C++ allows more freedom than C, because it doesn't require consecutive
bit-fields in the same allocation unit to occupy adjacent sets of bits.
That means that there's a lot more than just two different possible orders.
argh
Even in C, there's a lot more than just two possible orders...
Effectively, I read this phrase
The order of allocation of bit-fields within a unit (high-order to
low-order or low-order to high-order) is implementation-defined.
that an implementation would have to choose one of the orderings once
and for all and apply this to all cases consistently.
But it seems that interpreting such text then becomes more a question
of English skills than of anything else.
If in fact, people are interpreting this differently in the sense that
"given storage location X here is an algorithm to determine the
ordering" is sufficient as defintion for an implementation, and so
allowing for a determination of that ordering from location of the
storage unit inside a bigger unit and stuff like that, then
Do you still feel that the C standard is sufficiently specific?
no
and then it would need more precision. But my English is probably not
good enough to be capable to make a proposal that is better than the
existing text, then.
Jens