34 if(type.
id()==ID_merged_type)
39 else if(type.
id()==ID_signed)
41 else if(type.
id()==ID_unsigned)
43 else if(type.
id()==ID_ptr32)
45 else if(type.
id()==ID_ptr64)
47 else if(type.
id()==ID_volatile)
49 else if(type.
id()==ID_asm)
55 else if(type.
id()==ID_section &&
61 else if(type.
id()==ID_const)
63 else if(type.
id()==ID_restrict)
65 else if(type.
id()==ID_atomic)
67 else if(type.
id()==ID_atomic_type_specifier)
73 else if(type.
id()==ID_char)
75 else if(type.
id()==ID_int)
77 else if(type.
id()==ID_int8)
79 else if(type.
id()==ID_int16)
81 else if(type.
id()==ID_int32)
83 else if(type.
id()==ID_int64)
85 else if(type.
id()==ID_gcc_float16)
87 else if(type.
id()==ID_gcc_float32)
89 else if(type.
id()==ID_gcc_float32x)
91 else if(type.
id()==ID_gcc_float64)
93 else if(type.
id()==ID_gcc_float64x)
95 else if(type.
id()==ID_gcc_float128)
97 else if(type.
id()==ID_gcc_float128x)
99 else if(type.
id()==ID_gcc_int128)
101 else if(type.
id()==ID_gcc_attribute_mode)
105 else if(type.
id()==ID_msc_based)
107 const exprt &as_expr=
108 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
109 assert(as_expr.
operands().size()==1);
112 else if(type.
id()==ID_custom_bv)
115 const exprt &size_expr=
116 static_cast<const exprt &
>(type.
find(ID_size));
120 else if(type.
id()==ID_custom_floatbv)
124 const exprt &size_expr=
125 static_cast<const exprt &
>(type.
find(ID_size));
126 const exprt &fsize_expr=
127 static_cast<const exprt &
>(type.
find(ID_f));
132 else if(type.
id()==ID_custom_fixedbv)
136 const exprt &size_expr=
137 static_cast<const exprt &
>(type.
find(ID_size));
138 const exprt &fsize_expr=
139 static_cast<const exprt &
>(type.
find(ID_f));
144 else if(type.
id()==ID_short)
146 else if(type.
id()==ID_long)
148 else if(type.
id()==ID_double)
150 else if(type.
id()==ID_float)
152 else if(type.
id()==ID_c_bool)
154 else if(type.
id()==ID_proper_bool)
156 else if(type.
id()==ID_complex)
158 else if(type.
id()==ID_static)
160 else if(type.
id()==ID_thread_local)
162 else if(type.
id()==ID_inline)
164 else if(type.
id()==ID_extern)
166 else if(type.
id()==ID_typedef)
168 else if(type.
id()==ID_register)
170 else if(type.
id()==ID_weak)
172 else if(type.
id() == ID_used)
174 else if(type.
id()==ID_auto)
178 else if(type.
id()==ID_packed)
180 else if(type.
id()==ID_aligned)
190 else if(type.
id()==ID_transparent_union)
194 else if(type.
id()==ID_vector)
196 else if(type.
id()==ID_void)
201 other.push_back(tmp);
203 else if(type.
id()==ID_msc_declspec)
205 const exprt &as_expr=
206 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
211 const irep_idt &
id=it->get(ID_identifier);
217 assert(it->operands().size()==1);
223 else if(type.
id()==ID_noreturn)
225 else if(type.
id()==ID_constructor)
227 else if(type.
id()==ID_destructor)
229 else if(type.
id()==ID_alias &&
235 else if(type.
id()==ID_frontend_pointer)
242 const irep_idt typedef_identifier=type.
get(ID_C_typedef);
243 if(!typedef_identifier.
empty())
244 tmp.set(ID_C_typedef, typedef_identifier);
245 other.push_back(tmp);
247 else if(type.
id()==ID_pointer)
252 other.push_back(type);
274 error() <<
"illegal type modifier for defined type" <<
eom;
281 if(
other.front().id()==ID_asm &&
other.back().id()==ID_empty)
283 else if(
other.front().id()==ID_empty &&
other.back().id()==ID_asm)
290 error() <<
"illegal combination of defined types" <<
eom;
301 error() <<
"combining constructor and destructor not supported" 307 if(type.
id()==ID_code)
310 else if(type_p->
id()!=ID_empty)
313 error() <<
"constructor and destructor required to be type void, " 324 error() <<
"constructor and destructor required to be type void, " 339 error() <<
"cannot combine integer type with floating-point type" <<
eom;
350 error() <<
"conflicting type modifiers" <<
eom;
380 error() <<
"cannot combine integer type with floating-point type" <<
eom;
387 error() <<
"conflicting type modifiers" <<
eom;
405 error() <<
"conflicting type modifiers" <<
eom;
412 error() <<
"illegal type modifier for float" <<
eom;
424 error() <<
"illegal type modifier for C boolean type" <<
eom;
438 error() <<
"illegal type modifier for proper boolean type" <<
eom;
457 error() <<
"illegal type modifier for char type" <<
eom;
464 error() <<
"conflicting type modifiers" <<
eom;
483 error() <<
"conflicting type modifiers" <<
eom;
496 error() <<
"conflicting type modifiers" <<
eom;
533 type.
id(
is_signed?ID_custom_signedbv:ID_custom_unsignedbv);
538 type.
id(ID_custom_floatbv);
544 type.
id(ID_custom_fixedbv);
553 error() <<
"conflicting type modifiers" <<
eom;
586 error() <<
"illegal type modifier for integer type" <<
eom;
617 type.
set(ID_C_packed,
true);
bitvector_typet gcc_float128_type()
The type of an expression.
signedbv_typet gcc_signed_int128_type()
bool is_signed(const typet &t)
Convenience function – is the type signed?
c_qualifierst c_qualifiers
#define forall_subtypes(it, type)
struct configt::ansi_ct ansi_c
unsigned gcc_float32x_cnt
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
unsignedbv_typet unsigned_int_type()
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
bitvector_typet gcc_float64x_type()
bitvector_typet double_type()
unsignedbv_typet gcc_unsigned_int128_type()
static mstreamt & eom(mstreamt &m)
source_locationt source_location
unsigned gcc_float64x_cnt
bitvector_typet gcc_float32x_type()
const irep_idt & id() const
bitvector_typet float_type()
source_locationt source_location
A constant-size array type.
const irep_idt & get(const irep_namet &name) const
const exprt & size() const
bool is_transparent_union
signedbv_typet signed_long_int_type()
const vector_typet & to_vector_type(const typet &type)
Cast a generic typet to a vector_typet.
Base class for tree-like data structures with sharing.
#define forall_operands(it, expr)
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
std::size_t pointer_width
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)
unsigned gcc_float128x_cnt
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)
virtual void write(typet &src) const override
unsignedbv_typet unsigned_long_long_int_type()
bitvector_typet gcc_float64_type()
signedbv_typet signed_int_type()
unsignedbv_typet unsigned_char_type()
bitvector_typet gcc_float16_type()
const typet & subtype() const
unsignedbv_typet unsigned_long_int_type()
signedbv_typet signed_long_long_int_type()
const irept & find(const irep_namet &name) const
signedbv_typet signed_char_type()
bitvector_typet char_type()
const typet & return_type() const
bitvector_typet gcc_float128x_type()
bitvector_typet gcc_float32_type()
void set(const irep_namet &name, const irep_idt &value)