22 const std::string &src,
23 bool force_integer_type)
25 assert(src.size()>=2);
29 if(src[0]==
'L' || src[0]==
'u' || src[0]==
'U')
32 assert(src[src.size()-1]==
'\'');
34 std::basic_string<unsigned int> value=
46 else if(value.size()>=2 && value.size()<=4)
52 for(
unsigned i=0; i<value.size(); i++)
55 z = z << ((value.size() - i - 1) * CHAR_BIT);
64 " characters are not supported";
69 assert(src[src.size()-1]==
'\'');
81 else if(value.size()>=2 && value.size()<=4)
85 for(
unsigned i=0; i<value.size(); i++)
88 z = z << ((value.size() - i - 1) * CHAR_BIT);
97 " characters are not supported";
signedbv_typet signed_int_type()
bitvector_typet char_type()
bitvector_typet wchar_t_type()
Base class for all expressions.
The type of an expression, extends irept.
exprt convert_character_literal(const std::string &src, bool force_integer_type)
#define CHECK_RETURN(CONDITION)
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
std::string unescape_string(const std::string &src)
std::basic_string< unsigned int > unescape_wide_string(const std::string &src)
ANSI-C Language Conversion.