[cfe-dev] patch for generalizing stdint for n-bit bytes

Chris Lattner clattner at apple.com
Thu Nov 12 00:04:49 PST 2009


Applied in r86976, very nice Ken!

-Chris

On Nov 6, 2009, at 7:06 AM, Ken Dyck wrote:

> On Wednesday, November 04, 2009 6:04 PM, Chris Lattner wrote:
>>
>> On Oct 30, 2009, at 10:33 AM, Ken Dyck wrote:
>>>
>>> TargetInfo allows you to override the type, width, and alignment of
>>> several type definitions that are synonyms for the standard integer
>>> types (i.e. wchar_t, char16, char32, intmax_t). It is possible, for
>>> example, to specify int as 16-bits wide, define wchar_t as int, and
>>> wchar_t as 32-bits wide. This is exactly the situation with MSP430
>>> because it overrides the width of int but not of wchar_t,
>> and it leads
>>> to inconsistencies in limits.h and stdint.h.
>>>
>>> Are there any cases where you'd want to specify a width or
>> alignment
>>> for one of these typedefs that is different from the type that it
>>> denotes?
>>> If not, I propose that we remove the width and alignment
>> members from
>>> TargetInfo and calculate their values from the type that
>> they denote.
>>
>> Works for me!
>
> Patch attached.
> <TargetInfo-type-width- 
> overspecification.r86243 
> .patch>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list