Liste des Groupes | Revenir à cl c |
On 7/9/24 20:57, Lawrence D'Oliveiro wrote:
>On Sat, 6 Jul 2024 21:34:29 -0400, James Kuyper wrote:
On many platforms, if _Alignof(type) is less than the word size, then
a C pointer to that type is implemented as the combination of the
machine address of the correct word, combined with an offset within
that word of the first byte of that object.
Which is a terrific idea, except it cannot be carried to its logical
conclusion (addressing of arbitrarily-aligned dynamically-defined
bitfields) because of the requirement in the C spec that the size of a
“byte” be at least 8 bits.
I will grant you that I failed to mention the fact that this is a
feasible way of implementing C only on platforms with a word size of 16
bits or longer.
Les messages affichés proviennent d'usenet.