X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=types.c;h=e62c07fbaa5ed00c18e3550a6ee9af5183e0bb9b;hb=8401d6d945ec76bf96b3ebc479c70e1d5eba6870;hp=0f252455d761a16ffc2a090eb62fd40858e74909;hpb=6d7d61de445629e1590d3a2ba2990ef7a651368a;p=cparser diff --git a/types.c b/types.c index 0f25245..e62c07f 100644 --- a/types.c +++ b/types.c @@ -44,7 +44,9 @@ type_t *type_unsigned_long; type_t *type_void; type_t *type_char_ptr; +type_t *type_char_ptr_restrict; type_t *type_const_char_ptr; +type_t *type_const_char_ptr_restrict; type_t *type_int_ptr; type_t *type_long_long_ptr; type_t *type_long_ptr; @@ -52,6 +54,9 @@ type_t *type_unsigned_long_ptr; type_t *type_short_ptr; type_t *type_signed_char_ptr; type_t *type_void_ptr; +type_t *type_const_void_ptr; +type_t *type_void_ptr_restrict; +type_t *type_const_void_ptr_restrict; type_t *type_char_ptr_ptr; @@ -143,7 +148,12 @@ void init_basic_types(void) /* pointer types */ type_void_ptr = make_pointer_type(type_void, TYPE_QUALIFIER_NONE); + type_const_void_ptr = make_pointer_type(type_void, TYPE_QUALIFIER_CONST); + type_void_ptr_restrict = make_pointer_type(type_void, TYPE_QUALIFIER_RESTRICT); + type_const_void_ptr_restrict + = make_pointer_type(type_void, TYPE_QUALIFIER_CONST | TYPE_QUALIFIER_RESTRICT); type_char_ptr = make_pointer_type(type_char, TYPE_QUALIFIER_NONE); + type_char_ptr_restrict = make_pointer_type(type_char, TYPE_QUALIFIER_RESTRICT); type_signed_char_ptr = make_pointer_type(type_signed_char, TYPE_QUALIFIER_NONE); type_short_ptr = make_pointer_type(type_short, TYPE_QUALIFIER_NONE); type_int_ptr = make_pointer_type(type_int, TYPE_QUALIFIER_NONE); @@ -156,6 +166,7 @@ void init_basic_types(void) /* const character types */ type_const_char = make_atomic_type(ATOMIC_TYPE_CHAR, TYPE_QUALIFIER_CONST); type_const_char_ptr = make_pointer_type(type_const_char, TYPE_QUALIFIER_NONE); + type_const_char_ptr_restrict = make_pointer_type(type_const_char, TYPE_QUALIFIER_RESTRICT); /* other types */ type_intmax_t = type_long_long;