X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=types.c;h=812dc68c860bc210d15f59bfd790e313eda2b0c6;hb=f109471af0f1a95e840a66c9e136409d0973021c;hp=586b95ba2f4614af3dd392701b8240e89ab7c761;hpb=02f47f268839c472e23095ac0025e5ccbb5ed70a;p=cparser diff --git a/types.c b/types.c index 586b95b..812dc68 100644 --- a/types.c +++ b/types.c @@ -37,6 +37,7 @@ type_t *type_long; type_t *type_short; type_t *type_unsigned_short; type_t *type_signed_char; +type_t *type_unsigned_char; type_t *type_unsigned_int; type_t *type_unsigned_long_long; type_t *type_unsigned_long; @@ -47,6 +48,7 @@ type_t *type_const_char_ptr; type_t *type_int_ptr; type_t *type_long_long_ptr; type_t *type_long_ptr; +type_t *type_unsigned_long_ptr; type_t *type_short_ptr; type_t *type_signed_char_ptr; type_t *type_void_ptr; @@ -89,6 +91,7 @@ type_t *type_unsigned_int8; type_t *type_unsigned_int16; type_t *type_unsigned_int32; type_t *type_unsigned_int64; +type_t *type_int64_ptr; void init_basic_types(void) @@ -99,6 +102,7 @@ void init_basic_types(void) type_error_type = (type_t*)&error; type_bool = make_atomic_type(ATOMIC_TYPE_BOOL, TYPE_QUALIFIER_NONE); type_signed_char = make_atomic_type(ATOMIC_TYPE_SCHAR, TYPE_QUALIFIER_NONE); + type_unsigned_char = make_atomic_type(ATOMIC_TYPE_UCHAR, TYPE_QUALIFIER_NONE); type_short = make_atomic_type(ATOMIC_TYPE_SHORT, TYPE_QUALIFIER_NONE); type_unsigned_short = make_atomic_type(ATOMIC_TYPE_USHORT, TYPE_QUALIFIER_NONE); type_int = make_atomic_type(ATOMIC_TYPE_INT, TYPE_QUALIFIER_NONE); @@ -114,7 +118,7 @@ void init_basic_types(void) type_void = make_atomic_type(ATOMIC_TYPE_VOID, TYPE_QUALIFIER_NONE); /* microsoft types */ - if(c_mode & _MS) { + if (c_mode & _MS) { int8_type_kind = find_signed_int_atomic_type_kind_for_size(1); type_int8 = make_atomic_type(int8_type_kind, TYPE_QUALIFIER_NONE); int16_type_kind = find_signed_int_atomic_type_kind_for_size(2); @@ -131,6 +135,9 @@ void init_basic_types(void) type_unsigned_int32 = make_atomic_type(unsigned_int32_type_kind, TYPE_QUALIFIER_NONE); unsigned_int64_type_kind = find_unsigned_int_atomic_type_kind_for_size(8); type_unsigned_int64 = make_atomic_type(unsigned_int64_type_kind, TYPE_QUALIFIER_NONE); + + /* pointer types */ + type_int64_ptr = make_pointer_type(type_int64, TYPE_QUALIFIER_NONE); } /* pointer types */ @@ -140,6 +147,7 @@ void init_basic_types(void) type_short_ptr = make_pointer_type(type_short, TYPE_QUALIFIER_NONE); type_int_ptr = make_pointer_type(type_int, TYPE_QUALIFIER_NONE); type_long_ptr = make_pointer_type(type_long, TYPE_QUALIFIER_NONE); + type_unsigned_long_ptr = make_pointer_type(type_unsigned_long, TYPE_QUALIFIER_NONE); type_long_long_ptr = make_pointer_type(type_long_long, TYPE_QUALIFIER_NONE); type_char_ptr_ptr = make_pointer_type(type_char_ptr, TYPE_QUALIFIER_NONE);