32 if(type.
id()==ID_merged_type)
37 else if(type.
id()==ID_signed)
39 else if(type.
id()==ID_unsigned)
41 else if(type.
id()==ID_ptr32)
43 else if(type.
id()==ID_ptr64)
45 else if(type.
id()==ID_volatile)
47 else if(type.
id()==ID_asm)
53 else if(type.
id()==ID_section &&
59 else if(type.
id()==ID_const)
61 else if(type.
id()==ID_restrict)
63 else if(type.
id()==ID_atomic)
65 else if(type.
id()==ID_atomic_type_specifier)
71 else if(type.
id()==ID_char)
73 else if(type.
id()==ID_int)
75 else if(type.
id()==ID_int8)
77 else if(type.
id()==ID_int16)
79 else if(type.
id()==ID_int32)
81 else if(type.
id()==ID_int64)
83 else if(type.
id()==ID_gcc_float128)
85 else if(type.
id()==ID_gcc_int128)
87 else if(type.
id()==ID_gcc_attribute_mode)
91 else if(type.
id()==ID_msc_based)
94 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
95 assert(as_expr.
operands().size()==1);
98 else if(type.
id()==ID_custom_bv)
101 const exprt &size_expr=
102 static_cast<const exprt &
>(type.
find(ID_size));
106 else if(type.
id()==ID_custom_floatbv)
110 const exprt &size_expr=
111 static_cast<const exprt &
>(type.
find(ID_size));
112 const exprt &fsize_expr=
113 static_cast<const exprt &
>(type.
find(ID_f));
118 else if(type.
id()==ID_custom_fixedbv)
122 const exprt &size_expr=
123 static_cast<const exprt &
>(type.
find(ID_size));
124 const exprt &fsize_expr=
125 static_cast<const exprt &
>(type.
find(ID_f));
130 else if(type.
id()==ID_short)
132 else if(type.
id()==ID_long)
134 else if(type.
id()==ID_double)
136 else if(type.
id()==ID_float)
138 else if(type.
id()==ID_c_bool)
140 else if(type.
id()==ID_proper_bool)
142 else if(type.
id()==ID_complex)
144 else if(type.
id()==ID_static)
146 else if(type.
id()==ID_thread_local)
148 else if(type.
id()==ID_inline)
150 else if(type.
id()==ID_extern)
152 else if(type.
id()==ID_typedef)
154 else if(type.
id()==ID_register)
156 else if(type.
id()==ID_weak)
158 else if(type.
id()==ID_auto)
162 else if(type.
id()==ID_packed)
164 else if(type.
id()==ID_aligned)
174 else if(type.
id()==ID_transparent_union)
178 else if(type.
id()==ID_vector)
180 else if(type.
id()==ID_void)
185 other.push_back(tmp);
187 else if(type.
id()==ID_msc_declspec)
189 const exprt &as_expr=
190 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
195 const irep_idt &
id=it->get(ID_identifier);
201 assert(it->operands().size()==1);
207 else if(type.
id()==ID_noreturn)
209 else if(type.
id()==ID_constructor)
211 else if(type.
id()==ID_destructor)
213 else if(type.
id()==ID_alias &&
220 other.push_back(type);
238 error() <<
"illegal type modifier for defined type" <<
eom;
245 if(
other.front().id()==ID_asm &&
other.back().id()==ID_empty)
247 else if(
other.front().id()==ID_empty &&
other.back().id()==ID_asm)
254 error() <<
"illegal combination of defined types" <<
eom;
265 error() <<
"combining constructor and destructor not supported" 271 if(type.
id()==ID_code)
274 else if(type_p->
id()!=ID_empty)
277 error() <<
"constructor and destructor required to be type void, " 288 error() <<
"constructor and destructor required to be type void, " 300 error() <<
"cannot combine integer type with float" <<
eom;
307 error() <<
"conflicting type modifiers" <<
eom;
322 error() <<
"cannot combine integer type with float" <<
eom;
329 error() <<
"conflicting type modifiers" <<
eom;
347 error() <<
"conflicting type modifiers" <<
eom;
354 error() <<
"illegal type modifier for float" <<
eom;
366 error() <<
"illegal type modifier for C boolean type" <<
eom;
380 error() <<
"illegal type modifier for proper boolean type" <<
eom;
399 error() <<
"illegal type modifier for char type" <<
eom;
406 error() <<
"conflicting type modifiers" <<
eom;
425 error() <<
"conflicting type modifiers" <<
eom;
438 error() <<
"conflicting type modifiers" <<
eom;
475 type.
id(
is_signed?ID_custom_signedbv:ID_custom_unsignedbv);
480 type.
id(ID_custom_floatbv);
486 type.
id(ID_custom_fixedbv);
495 error() <<
"conflicting type modifiers" <<
eom;
528 error() <<
"illegal type modifier for integer type" <<
eom;
561 type.
set(ID_C_packed,
true);
The type of an expression.
bool is_signed(const typet &t)
Convenience function – is the type signed?
c_qualifierst c_qualifiers
#define forall_subtypes(it, type)
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
unsignedbv_typet unsigned_int_type()
bitvector_typet double_type()
static mstreamt & eom(mstreamt &m)
source_locationt source_location
const irep_idt & id() const
bitvector_typet float_type()
source_locationt source_location
A constant-size array type.
void write(typet &src) const
const irep_idt & get(const irep_namet &name) const
const exprt & size() const
bool is_transparent_union
signedbv_typet signed_long_int_type()
Base class for tree-like data structures with sharing.
#define forall_operands(it, expr)
ANSI-C Language Conversion.
bitvector_typet long_double_type()
const source_locationt & source_location() const
signedbv_typet signed_short_int_type()
Complex numbers made of pair of given subtype.
unsigned gcc_float128_cnt
c_storage_spect c_storage_spec
void read(const typet &type)
unsignedbv_typet gcc_unsigned_int128_type()
bitvector_typet gcc_float128_type()
unsignedbv_typet unsigned_short_int_type()
Base class for all expressions.
source_locationt & add_source_location()
const source_locationt & source_location() const
void read_rec(const typet &type)
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
unsignedbv_typet unsigned_long_long_int_type()
signedbv_typet signed_int_type()
unsignedbv_typet unsigned_char_type()
const typet & subtype() const
unsignedbv_typet unsigned_long_int_type()
signedbv_typet gcc_signed_int128_type()
signedbv_typet signed_long_long_int_type()
const vector_typet & to_vector_type(const typet &type)
Cast a generic typet to a vector_typet.
const irept & find(const irep_namet &name) const
signedbv_typet signed_char_type()
bitvector_typet char_type()
const typet & return_type() const
void set(const irep_namet &name, const irep_idt &value)