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

Chris Lattner clattner at apple.com
Thu Oct 29 22:06:06 PDT 2009


On Oct 29, 2009, at 7:52 AM, Ken Dyck wrote:
>> This is a great start, applied as r85481.  Removing the rest would be
>> even better :)
>
> One obstacle I found to simplifying the code is that the char type is
> not included in the TargetInfo::IntTy enumeration, making it necessary
> to always add a special case for characters. What is the rational for
> excluding characters? Would there be any objection to adding a Char  
> type
> to the enum?

It probably was just not needed yet, so noone added it.

>> Ok.  Please send this as a follow on patch.
>
> Okay. FYI, this is the plan I'll be working from for future patches:
>
> 1. A simple reordering of typedefs in stdint.h (and corresponding test
> cases) in anticipation of the next patch, which defines the types in
> order of decreasing width.

> 2. Generalization of stdint.h for non-power-of-2 widths, along with
> necessary modifications to InitPreprocessor.cpp. Only minor changes to
> test cases (where long is replaced by int in some typedefs on targets
> where they are the same width).
> 3. Parameterization of SIG_ATOMIC
> 4. Parameterization of limits on types that can be either signed or
> unsigned.
> 5. Replace use of vector<char> for the definition buffer with a
> raw_ostream.
>
> Does that seem reasonable to you?

Sounds great!  Thanks Ken,

-Chris



More information about the cfe-dev mailing list