[ub] Aliasing char16_t with int_least16_t, etc.

Lawrence Crowl Lawrence at Crowl.org
Mon Nov 4 00:41:18 CET 2013


On 11/1/13, Daniel Krügler <daniel.kruegler at gmail.com> wrote:
> 2013/11/1 Lawrence Crowl <Lawrence at crowl.org>:
>> Reading the C standard, there does not seem to be any requirement
>> that uint* typedefs have the same size as the corresponding int*
>> typedefs.
>
> I disagree. According to C99 7.18.1 p1:
>
> "When typedef names differing only in the absence or presence of
> the initial u are defined, they shall denote corresponding signed
> and unsigned types as described in 6.2.5; an implementation
> providing one of these corresponding types shall also provide the
> other."

I missed that.  The nice thing about standards clauses is that there
are so many to choose from.  :-)

-- 
Lawrence Crowl


More information about the ub mailing list