C bitfields guarantees
Timon Gehr
timon.gehr at gmx.ch
Fri Jul 5 17:02:23 UTC 2024
On 7/5/24 18:35, Walter Bright wrote:
>
> Consider also that the C standard does not specify the size of a 'char'.
D does specify it.
> There are C compilers for special CPUs that have different char sizes -
> notably 32 bit chars for some DSP processors, and 10 bit chars for the
> CPU on a Mattel Intellivision game computer. C on a PDP-10 has 36 bit
> ints, too! and 18 bit shorts.
>
> I can pretty much guarantee that all C code developed on a conventional
> CPU will fail to work on those machines.
>
> But so what. When you port to a diverse machine, you expect such problems.
Well, this is the D newsgroup.
More information about the Digitalmars-d
mailing list