C++ Logo

SG12

Advanced search

Subject: Re: [ub] Aliasing char16_t with int_least16_t, etc.
From: Jean-Marc Bourguet (jm_at_[hidden])
Date: 2013-11-04 05:29:36


On Sun, 3 Nov 2013 15:41:18 -0800, Lawrence Crowl <Lawrence_at_[hidden]>
wrote:
> On 11/1/13, Daniel Krügler <daniel.kruegler_at_[hidden]> wrote:
>> 2013/11/1 Lawrence Crowl <Lawrence_at_[hidden]>:
>>> 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

SG12 list run by sg12-owner@lists.isocpp.org