Go to the documentation of this file.
43 result.
set(ID_C_c_type, ID_signed_int);
50 result.
set(ID_C_c_type, ID_signed_short_int);
57 result.
set(ID_C_c_type, ID_unsigned_int);
64 result.
set(ID_C_c_type, ID_unsigned_short_int);
93 result.
set(ID_C_c_type, ID_signed_long_int);
100 result.
set(ID_C_c_type, ID_signed_long_long_int);
107 result.
set(ID_C_c_type, ID_unsigned_long_int);
114 result.
set(ID_C_c_type, ID_unsigned_long_long_int);
134 result.
set(ID_C_c_type, ID_char);
135 return std::move(result);
140 result.
set(ID_C_c_type, ID_char);
141 return std::move(result);
148 result.
set(ID_C_c_type, ID_unsigned_char);
155 result.
set(ID_C_c_type, ID_signed_char);
164 result.
set(ID_C_c_type, ID_wchar_t);
165 return std::move(result);
170 result.
set(ID_C_c_type, ID_wchar_t);
171 return std::move(result);
181 result.
set(ID_C_c_type, ID_char16_t);
191 result.
set(ID_C_c_type, ID_char32_t);
199 result.
set(ID_C_c_type, ID_float);
207 result.
set(ID_C_c_type, ID_double);
231 INVARIANT(
false,
"width of long double");
233 result.
set(ID_C_c_type, ID_long_double);
250 INVARIANT(
false,
"width of pointer difference");
271 if(c_type==ID_signed_int)
273 else if(c_type==ID_signed_short_int)
274 return "signed short int";
275 else if(c_type==ID_unsigned_int)
276 return "unsigned int";
277 else if(c_type==ID_unsigned_short_int)
278 return "unsigned short int";
279 else if(c_type==ID_signed_long_int)
280 return "signed long int";
281 else if(c_type==ID_signed_long_long_int)
282 return "signed long long int";
283 else if(c_type==ID_unsigned_long_int)
284 return "unsigned long int";
285 else if(c_type==ID_unsigned_long_long_int)
286 return "unsigned long long int";
287 else if(c_type==ID_bool)
289 else if(c_type==ID_char)
291 else if(c_type==ID_unsigned_char)
292 return "unsigned char";
293 else if(c_type==ID_signed_char)
294 return "signed char";
295 else if(c_type==ID_wchar_t)
297 else if(c_type==ID_char16_t)
299 else if(c_type==ID_char32_t)
301 else if(c_type==ID_float)
303 else if(c_type==ID_double)
305 else if(c_type==ID_long_double)
306 return "long double";
307 else if(c_type==ID_gcc_float128)
309 else if(c_type==ID_unsigned_int128)
310 return "unsigned __int128";
311 else if(c_type==ID_signed_int128)
312 return "signed __int128";
326 for(
const auto &comp : comps)
330 if(!element_width.has_value())
333 if(max_width.has_value() && *element_width <= *max_width)
336 max_width = *element_width;
337 max_comp_type = comp.type();
338 max_comp_name = comp.get_name();
341 if(!max_width.has_value())
344 return std::make_pair(
const componentst & components() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
std::size_t wchar_t_width
signedbv_typet signed_char_type()
signedbv_typet signed_long_long_int_type()
The type of an expression, extends irept.
unsignedbv_typet char32_t_type()
optionalt< 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.
floatbv_typet long_double_type()
Fixed-width bit-vector with IEEE floating-point interpretation.
static ieee_float_spect quadruple_precision()
std::vector< componentt > componentst
unsignedbv_typet unsigned_char_type()
struct configt::ansi_ct ansi_c
unsignedbv_typet char16_t_type()
bitvector_typet index_type()
unsignedbv_typet unsigned_short_int_type()
Fixed-width bit-vector with unsigned binary interpretation.
unsignedbv_typet unsigned_long_long_int_type()
bitvector_typet enum_constant_type()
unsignedbv_typet unsigned_long_int_type()
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
static ieee_float_spect double_precision()
signedbv_typet signed_int_type()
void set(const irep_idt &name, const irep_idt &value)
class floatbv_typet to_type() const
optionalt< mp_integer > pointer_offset_bits(const typet &type, const namespacet &ns)
Fixed-width bit-vector with two's complement interpretation.
bitvector_typet wchar_t_type()
signedbv_typet signed_short_int_type()
floatbv_typet float_type()
signedbv_typet signed_size_type()
std::size_t long_long_int_width
pointer_typet pointer_type(const typet &subtype)
unsignedbv_typet unsigned_int_type()
nonstd::optional< T > optionalt
floatbv_typet double_type()
bitvector_typet char_type()
reference_typet reference_type(const typet &subtype)
std::string c_type_as_string(const irep_idt &c_type)
Base class of fixed-width bit-vector types.
std::size_t long_double_width
std::size_t short_int_width
bitvector_typet c_enum_constant_type()
return type of enum constants
signedbv_typet signed_long_int_type()
std::size_t pointer_width
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
signedbv_typet pointer_diff_type()
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
unsignedbv_typet size_type()
bitvector_typet c_index_type()
static ieee_float_spect single_precision()
std::size_t long_int_width