25 result.
set(ID_C_c_type, ID_signed_int);
32 result.
set(ID_C_c_type, ID_signed_short_int);
39 result.
set(ID_C_c_type, ID_unsigned_int);
46 result.
set(ID_C_c_type, ID_unsigned_short_int);
75 result.
set(ID_C_c_type, ID_signed_long_int);
82 result.
set(ID_C_c_type, ID_signed_long_long_int);
89 result.
set(ID_C_c_type, ID_unsigned_long_int);
96 result.
set(ID_C_c_type, ID_unsigned_long_long_int);
116 result.
set(ID_C_c_type, ID_char);
117 return std::move(result);
122 result.
set(ID_C_c_type, ID_char);
123 return std::move(result);
130 result.
set(ID_C_c_type, ID_unsigned_char);
137 result.
set(ID_C_c_type, ID_signed_char);
146 result.
set(ID_C_c_type, ID_wchar_t);
147 return std::move(result);
152 result.
set(ID_C_c_type, ID_wchar_t);
153 return std::move(result);
163 result.
set(ID_C_c_type, ID_char16_t);
173 result.
set(ID_C_c_type, ID_char32_t);
181 result.
set(ID_C_c_type, ID_float);
189 result.
set(ID_C_c_type, ID_double);
213 INVARIANT(
false,
"width of long double");
215 result.
set(ID_C_c_type, ID_long_double);
232 INVARIANT(
false,
"width of pointer difference");
253 if(c_type==ID_signed_int)
255 else if(c_type==ID_signed_short_int)
256 return "signed short int";
257 else if(c_type==ID_unsigned_int)
258 return "unsigned int";
259 else if(c_type==ID_unsigned_short_int)
260 return "unsigned short int";
261 else if(c_type==ID_signed_long_int)
262 return "signed long int";
263 else if(c_type==ID_signed_long_long_int)
264 return "signed long long int";
265 else if(c_type==ID_unsigned_long_int)
266 return "unsigned long int";
267 else if(c_type==ID_unsigned_long_long_int)
268 return "unsigned long long int";
269 else if(c_type==ID_bool)
271 else if(c_type==ID_char)
273 else if(c_type==ID_unsigned_char)
274 return "unsigned char";
275 else if(c_type==ID_signed_char)
276 return "signed char";
277 else if(c_type==ID_wchar_t)
279 else if(c_type==ID_char16_t)
281 else if(c_type==ID_char32_t)
283 else if(c_type==ID_float)
285 else if(c_type==ID_double)
287 else if(c_type==ID_long_double)
288 return "long double";
289 else if(c_type==ID_gcc_float128)
291 else if(c_type==ID_unsigned_int128)
292 return "unsigned __int128";
293 else if(c_type==ID_signed_int128)
294 return "signed __int128";
299 std::optional<std::pair<struct_union_typet::componentt, mp_integer>>
304 std::optional<mp_integer> max_width;
308 for(
const auto &comp : comps)
312 if(!element_width.has_value())
315 if(max_width.has_value() && *element_width <= *max_width)
318 max_width = *element_width;
319 max_comp_type = comp.type();
320 max_comp_name = comp.get_name();
323 if(!max_width.has_value())
326 return std::make_pair(
floatbv_typet float_type()
signedbv_typet signed_long_int_type()
signedbv_typet signed_char_type()
unsignedbv_typet unsigned_int_type()
unsignedbv_typet unsigned_long_long_int_type()
unsignedbv_typet char32_t_type()
unsignedbv_typet unsigned_long_int_type()
reference_typet reference_type(const typet &subtype)
unsignedbv_typet size_type()
std::string c_type_as_string(const irep_idt &c_type)
signedbv_typet signed_int_type()
pointer_typet pointer_type(const typet &subtype)
signedbv_typet pointer_diff_type()
unsignedbv_typet unsigned_char_type()
signedbv_typet signed_size_type()
bitvector_typet char_type()
signedbv_typet signed_long_long_int_type()
bitvector_typet wchar_t_type()
floatbv_typet long_double_type()
bitvector_typet c_index_type()
floatbv_typet double_type()
signedbv_typet signed_short_int_type()
unsignedbv_typet unsigned_short_int_type()
unsignedbv_typet char16_t_type()
Base class of fixed-width bit-vector types.
struct configt::ansi_ct ansi_c
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Fixed-width bit-vector with IEEE floating-point interpretation.
static ieee_float_spect single_precision()
static ieee_float_spect quadruple_precision()
class floatbv_typet to_type() const
static ieee_float_spect double_precision()
void set(const irep_idt &name, const irep_idt &value)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
Fixed-width bit-vector with two's complement interpretation.
const componentst & components() const
std::vector< componentt > componentst
The type of an expression, extends irept.
std::optional< std::pair< struct_union_typet::componentt, mp_integer > > find_widest_union_component(const namespacet &ns) const
Determine the member of maximum bit width in a union type.
Fixed-width bit-vector with unsigned binary interpretation.
std::optional< mp_integer > pointer_offset_bits(const typet &type, const namespacet &ns)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
std::size_t long_double_width
std::size_t pointer_width
std::size_t wchar_t_width
std::size_t long_long_int_width
std::size_t long_int_width
std::size_t short_int_width