Go to the documentation of this file.
35 if(type.
id()==ID_merged_type)
40 else if(type.
id()==ID_signed)
42 else if(type.
id()==ID_unsigned)
44 else if(type.
id()==ID_ptr32)
46 else if(type.
id()==ID_ptr64)
48 else if(type.
id()==ID_volatile)
50 else if(type.
id()==ID_asm)
56 else if(type.
id()==ID_section &&
62 else if(type.
id()==ID_const)
64 else if(type.
id()==ID_restrict)
66 else if(type.
id()==ID_atomic)
68 else if(type.
id()==ID_atomic_type_specifier)
74 else if(type.
id()==ID_char)
76 else if(type.
id()==ID_int)
78 else if(type.
id()==ID_int8)
80 else if(type.
id()==ID_int16)
82 else if(type.
id()==ID_int32)
84 else if(type.
id()==ID_int64)
86 else if(type.
id()==ID_gcc_float16)
88 else if(type.
id()==ID_gcc_float32)
90 else if(type.
id()==ID_gcc_float32x)
92 else if(type.
id()==ID_gcc_float64)
94 else if(type.
id()==ID_gcc_float64x)
96 else if(type.
id()==ID_gcc_float128)
98 else if(type.
id()==ID_gcc_float128x)
100 else if(type.
id()==ID_gcc_int128)
102 else if(type.
id()==ID_gcc_attribute_mode)
106 else if(type.
id()==ID_msc_based)
108 const exprt &as_expr=
109 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
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);
222 else if(type.
id()==ID_noreturn)
224 else if(type.
id()==ID_constructor)
226 else if(type.
id()==ID_destructor)
228 else if(type.
id()==ID_alias &&
234 else if(type.
id()==ID_frontend_pointer)
241 const irep_idt typedef_identifier=type.
get(ID_C_typedef);
242 if(!typedef_identifier.
empty())
243 tmp.
set(ID_C_typedef, typedef_identifier);
244 other.push_back(tmp);
246 else if(type.
id()==ID_pointer)
251 other.push_back(type);
273 error() <<
"illegal type modifier for defined type" <<
eom;
280 if(
other.front().id()==ID_asm &&
other.back().id()==ID_empty)
282 else if(
other.front().id()==ID_empty &&
other.back().id()==ID_asm)
289 error() <<
"illegal combination of defined types" <<
eom;
300 error() <<
"combining constructor and destructor not supported"
306 if(type.
id()==ID_code)
309 else if(type_p->
id()!=ID_empty)
312 error() <<
"constructor and destructor required to be type void, "
323 error() <<
"constructor and destructor required to be type void, "
338 error() <<
"cannot combine integer type with floating-point type" <<
eom;
349 error() <<
"conflicting type modifiers" <<
eom;
379 error() <<
"cannot combine integer type with floating-point type" <<
eom;
386 error() <<
"conflicting type modifiers" <<
eom;
404 error() <<
"conflicting type modifiers" <<
eom;
411 error() <<
"illegal type modifier for float" <<
eom;
423 error() <<
"illegal type modifier for C boolean type" <<
eom;
437 error() <<
"illegal type modifier for proper boolean type" <<
eom;
456 error() <<
"illegal type modifier for char type" <<
eom;
463 error() <<
"conflicting type modifiers" <<
eom;
482 error() <<
"conflicting type modifiers" <<
eom;
495 error() <<
"conflicting type modifiers" <<
eom;
532 type.
id(
is_signed?ID_custom_signedbv:ID_custom_unsignedbv);
537 type.
id(ID_custom_floatbv);
543 type.
id(ID_custom_fixedbv);
552 error() <<
"conflicting type modifiers" <<
eom;
585 error() <<
"illegal type modifier for integer type" <<
eom;
627 type.
set(ID_C_packed,
true);
#define UNREACHABLE
This should be used to mark dead code.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const unary_exprt & to_unary_expr(const exprt &expr)
Cast an exprt to a unary_exprt.
const typet & subtype() const
floatbv_typet gcc_float32_type()
virtual void set_attributes(typet &type) const
Add qualifiers and GCC attributes onto type.
floatbv_typet gcc_float64x_type()
signedbv_typet signed_long_long_int_type()
signedbv_typet signed_char_type()
The type of an expression, extends irept.
floatbv_typet gcc_float16_type()
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
ANSI-C Language Conversion.
floatbv_typet long_double_type()
unsigned gcc_float32x_cnt
virtual void write(typet &type)
source_locationt source_location
bool is_signed(const typet &t)
Convenience function – is the type signed?
c_qualifierst c_qualifiers
const irept & find(const irep_namet &name) const
const string_constantt & to_string_constant(const exprt &expr)
Base class for all expressions.
Complex numbers made of pair of given subtype.
unsignedbv_typet unsigned_char_type()
Type with a single subtype.
unsigned gcc_float64x_cnt
struct configt::ansi_ct ansi_c
floatbv_typet gcc_float128_type()
unsignedbv_typet unsigned_short_int_type()
floatbv_typet gcc_float64_type()
unsignedbv_typet unsigned_long_long_int_type()
unsignedbv_typet unsigned_long_int_type()
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
signedbv_typet signed_int_type()
source_locationt source_location
#define forall_operands(it, expr)
signedbv_typet gcc_signed_int128_type()
const source_locationt & source_location() const
signedbv_typet signed_short_int_type()
virtual void write(typet &src) const override
floatbv_typet float_type()
unsigned gcc_float128_cnt
unsignedbv_typet unsigned_int_type()
const irep_idt & id() const
source_locationt & add_source_location()
const constant_exprt & size() const
c_storage_spect c_storage_spec
#define forall_subtypes(it, type)
floatbv_typet double_type()
bitvector_typet char_type()
virtual void build_type_with_subtype(typet &type) const
Build a vector or complex type with type as subtype.
const irep_idt & get(const irep_namet &name) const
void set(const irep_namet &name, const irep_idt &value)
unsignedbv_typet gcc_unsigned_int128_type()
signedbv_typet signed_long_int_type()
const vector_typet & to_vector_type(const typet &type)
Cast a typet to a vector_typet.
const typet & return_type() const
unsigned gcc_float128x_cnt
virtual void read(const typet &type)
There are a large number of kinds of tree structured or tree-like data in CPROVER.
std::size_t pointer_width
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
const source_locationt & source_location() const
floatbv_typet gcc_float32x_type()
const irep_idt & get_value() const
virtual void read_rec(const typet &type)
bool is_transparent_union
floatbv_typet gcc_float128x_type()