X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=types.c;h=1f34936ceb051e1ede13adfa30f9b8c0096b939e;hb=c2564629583b7a0969aa0102d628f065b1ed66d3;hp=9057e4772f3421c77177cdb140f5300cf2aec73d;hpb=bc624857ad8caa300dd45554676e5013c8235880;p=cparser diff --git a/types.c b/types.c index 9057e47..1f34936 100644 --- a/types.c +++ b/types.c @@ -24,6 +24,7 @@ /** The error type. */ type_t *type_error_type; +type_t *type_bool; type_t *type_char; type_t *type_const_char; type_t *type_double; @@ -33,6 +34,7 @@ type_t *type_long_double; type_t *type_long_long; type_t *type_long; type_t *type_short; +type_t *type_unsigned_short; type_t *type_signed_char; type_t *type_unsigned_int; type_t *type_unsigned_long_long; @@ -90,13 +92,14 @@ type_t *type_unsigned_int64; void init_basic_types(void) { - static const type_base_t error = { TYPE_ERROR, TYPE_QUALIFIER_NONE, - TYPE_MODIFIER_NONE, 0, { NULL, 0 }, - NULL }; + static const type_base_t error = { TYPE_ERROR, 0, TYPE_QUALIFIER_NONE, + TYPE_MODIFIER_NONE, 0, NULL }; 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_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); type_unsigned_int = make_atomic_type(ATOMIC_TYPE_UINT, TYPE_QUALIFIER_NONE); type_long = make_atomic_type(ATOMIC_TYPE_LONG, TYPE_QUALIFIER_NONE);