X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=types.c;h=0c71f81cbf72a0cb2b2c4c0bb2e08b2f88eb97e3;hb=48aeb18bc128123e52b63b85a35615f81e68583b;hp=9f0788845763f1c4992e560bfb5e22a252d21736;hpb=27040b8042ae6b0ac7974f52abd95d7562da6d9a;p=cparser diff --git a/types.c b/types.c index 9f07888..0c71f81 100644 --- a/types.c +++ b/types.c @@ -1,6 +1,6 @@ /* * This file is part of cparser. - * Copyright (C) 2007-2008 Matthias Braun + * Copyright (C) 2007-2009 Matthias Braun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -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,8 @@ 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_char_ptr_ptr; @@ -143,7 +147,10 @@ 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_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 +163,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;