This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] More CCP fixes [patch]


On Mon, 12 Aug 2002, Mark Mitchell wrote:

> > It's true in C99 to the best of my knowledge.  C++ could well be
> > different.  Is that what you're referring to?  If so, hmm, things
> > could be even more complicated.
> 
> No, I think it's the same -- but I don't have a C99 standard handy.
> 
> The C++ standard has no notion of a "3-bit integer type".  It has
> bool, char, short, int, long, and wchar_t, with signed/unsigned
> variants as appropriate.

C99 (and C90) defines that they are types with the appropriate number of
bits - and are promoted to int in expressions if int can represent all the
values of that type, otherwise to unsigned int.  (All the problem cases
with the patch - enum bit-fields, bit-fields of types other than _Bool,
int, signed int or unsigned int - are GCC extensions.  But see the thread
on comp.std.c in April about exactly what the type of an _Bool bit-field
is meant to mean.)

C90 DRs #015, #120, #122 are relevant (in confirming that bit-fields have
their own types).

http://groups.google.com/groups?threadm=1e4d2e2b4b.kbracey%40kbracey.cam.pace.co.uk

http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/dr_015.html
http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/dr_120.html
http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/dr_122.html

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]