From f030b60d45e64e254a337c5328c2979b69b18fb7 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Mon, 15 Oct 2018 12:09:24 +0000 Subject: [PATCH] Do not duplicate what c_type_as_string takes care of With the exception of "bool", the type string output of the C front-end can be used in the C++ front-end; the C front-end in turn uses c_type_as_string. --- src/cpp/expr2cpp.cpp | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/src/cpp/expr2cpp.cpp b/src/cpp/expr2cpp.cpp index fca07810b1c..7d91a50ef47 100644 --- a/src/cpp/expr2cpp.cpp +++ b/src/cpp/expr2cpp.cpp @@ -149,37 +149,7 @@ std::string expr2cppt::convert_rec( { const irep_idt c_type=src.get(ID_C_c_type); - if(c_type==ID_signed_char) - return q+"signed char"+d; - else if(c_type==ID_unsigned_char) - return q+"unsigned char"+d; - else if(c_type==ID_char) - return q+"char"+d; - else if(c_type==ID_signed_short_int) - return q+"short"+d; - else if(c_type==ID_unsigned_short_int) - return q+"unsigned short"+d; - else if(c_type==ID_signed_int) - return q+"int"+d; - else if(c_type==ID_unsigned_int) - return q+"unsigned"+d; - else if(c_type==ID_signed_long_int) - return q+"long"+d; - else if(c_type==ID_unsigned_long_int) - return q+"unsigned long"+d; - else if(c_type==ID_signed_long_long_int) - return q+"long long"+d; - else if(c_type==ID_unsigned_long_long_int) - return q+"unsigned long long"+d; - else if(c_type==ID_wchar_t) - return q+"wchar_t"+d; - else if(c_type==ID_float) - return q+"float"+d; - else if(c_type==ID_double) - return q+"double"+d; - else if(c_type==ID_long_double) - return q+"long double"+d; - else if(c_type==ID_bool) + if(c_type == ID_bool) return q+"bool"+d; else return expr2ct::convert_rec(src, qualifiers, declarator);