[ub] Aliasing char16_t with int_least16_t, etc.

Jean-Marc Bourguet jm at bourguet.org
Mon Nov 4 12:29:36 CET 2013


On Sun, 3 Nov 2013 15:41:18 -0800, Lawrence Crowl <Lawrence at Crowl.org>
wrote:
> 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.

As I did (and Daniel's email which seems to have caugh the attention of
the spam trapper as well)

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

In this case it's not so bad, it's in a place where I should have
looked.
What I hate is when an exception to a rule is given in an unrelated
clause
and not referenced.

Yours,

-- 
Jean-Marc


More information about the ub mailing list