C++ Logo

sg12

Advanced search

Re: [ub] Justification for < not being a total order on pointers?

From: Lawrence Crowl <Lawrence_at_[hidden]>
Date: Sun, 27 Oct 2013 22:20:19 -0700
On 10/18/13, Ion Gaztaņaga <igaztanaga_at_[hidden]> wrote:
> El 18/10/2013 18:29, Ion Gaztaņaga wrote:
>> Maybe we can require CHAR_BIT to be power of two but not exactly 8 bits.
>
> Correction: Freescale's 24 bit DSPs for signal processing (I also can
> see references for 28/56 bit DSPs from Analog) has CHAR_BIT == 24.
>
> application-notes.digchip.com/314/314-68461.pdf
>
> "3.4 Data Types and Sizes
>
> Due to the word orientation ofthe DSP56300 family (24-bit words), all
> data types are aligned on word boundaries. This has several side
> effects,one of which is that sizeof(char) is equal to sizeof(int)."
>
> "Data Type / Size (words) / Min value / Max value
>
> char / 1 / -8388608 / 8388607
> unsigned char / 1 / 0 / 0xFFFFFF
> short / 1 / -8388608 / 8388607
> unsigned short / 1 / 0 / 0xFFFFFF
> int / 1 / -8388608 / 8388607
> unsigned int / 1 / 0 / 0xFFFFFF
> long / 2 / -140737488355328 / 140737488355327
> unsigned long / 2 / 0 / 0xFFFFFFFFFFFF"

Note that this machine cannot support int{8,16,32,64}_t typedefs.

-- 
Lawrence Crowl

Received on 2013-10-28 06:20:20