/*
* This file is part of cparser.
- * Copyright (C) 2007-2009 Matthias Braun <matze@braunis.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * Copyright (C) 2012 Matthias Braun <matze@braunis.de>
*/
#include "type_t.h"
#include "types.h"
type_t *type_char_ptr_ptr;
+type_t *type_char16_t;
+type_t *type_char32_t;
+type_t *type_char16_t_const;
+type_t *type_char32_t_const;
type_t *type_intmax_t;
type_t *type_ptrdiff_t;
type_t *type_size_t;
type_t *type_int32_t;
type_t *type_int64_t;
+type_t *type_char16_t_ptr;
+type_t *type_char32_t_ptr;
+type_t *type_char16_t_const_ptr;
+type_t *type_char32_t_const_ptr;
type_t *type_intmax_t_ptr;
type_t *type_ptrdiff_t_ptr;
type_t *type_ssize_t_ptr;
type_t *type_valist;
/* microsoft types */
-atomic_type_kind_t int8_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t int16_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t int32_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t int64_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t int128_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t unsigned_int8_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t unsigned_int16_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t unsigned_int32_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t unsigned_int64_type_kind = ATOMIC_TYPE_INVALID;
-atomic_type_kind_t unsigned_int128_type_kind = ATOMIC_TYPE_INVALID;
+atomic_type_kind_t int8_type_kind;
+atomic_type_kind_t int16_type_kind;
+atomic_type_kind_t int32_type_kind;
+atomic_type_kind_t int64_type_kind;
+atomic_type_kind_t int128_type_kind;
+atomic_type_kind_t unsigned_int8_type_kind;
+atomic_type_kind_t unsigned_int16_type_kind;
+atomic_type_kind_t unsigned_int32_type_kind;
+atomic_type_kind_t unsigned_int64_type_kind;
+atomic_type_kind_t unsigned_int128_type_kind;
type_t *type_int8;
type_t *type_int16;
type_wchar_t_ptr = make_pointer_type(type_wchar_t, TYPE_QUALIFIER_NONE);
type_const_wchar_t_ptr
= make_pointer_type(type_const_wchar_t, TYPE_QUALIFIER_NONE);
+
+ atomic_type_kind_t const u2 = find_unsigned_int_atomic_type_kind_for_size(2);
+ type_char16_t = make_atomic_type(u2, TYPE_QUALIFIER_NONE);
+ type_char16_t_const = make_atomic_type(u2, TYPE_QUALIFIER_CONST);
+ type_char16_t_ptr = make_pointer_type(type_char16_t, TYPE_QUALIFIER_NONE);
+ type_char16_t_const_ptr = make_pointer_type(type_char16_t_const, TYPE_QUALIFIER_NONE);
+
+ atomic_type_kind_t const u4 = find_unsigned_int_atomic_type_kind_for_size(4);
+ type_char32_t = make_atomic_type(u4, TYPE_QUALIFIER_NONE);
+ type_char32_t_const = make_atomic_type(u4, TYPE_QUALIFIER_CONST);
+ type_char32_t_ptr = make_pointer_type(type_char32_t, TYPE_QUALIFIER_NONE);
+ type_char32_t_const_ptr = make_pointer_type(type_char32_t_const, TYPE_QUALIFIER_NONE);
}