[cfe-dev] patch for generalizing stdint for n-bit bytes
Ken.Dyck at onsemi.com
Fri Oct 30 07:41:32 CDT 2009
On Friday, October 30, 2009 1:06 AM, Chris Lattner wrote:
> 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.
Alright. If there aren't any objections, then, I'll add it and do a more
thorough scrub of InitPreprocessor.cpp.
> > 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.
Stage #1 patch attached. It is a simple reordering of the definitions in
stdint.h and introduces no new function changes.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 26324 bytes
Url : http://lists.cs.uiuc.edu/pipermail/cfe-dev/attachments/20091030/a4edb772/attachment-0001.obj
More information about the cfe-dev