diff --git a/convert.ml b/convert.ml index 7f39ea8f7a4287431201ce41c86b4f85841c69a8..2bbb4b5e8c4e9323c806cad7cb2525bfdeb1ba9f 100644 --- a/convert.ml +++ b/convert.ml @@ -141,9 +141,9 @@ let make_integral_constant_kind k v = let s = match k with | IBool - | IChar_s | ISChar | IWChar_s | IWSChar + | IChar_s | ISChar | IWChar_s | IChar | IWChar | IShort | IInt -> "" - | IChar_u | IUChar | IChar16 | IChar32 | IWChar_u | IWUChar + | IChar_u | IUChar | IChar16 | IChar32 | IWChar_u | IUShort | IUInt -> "U" | ILong -> "L" | IULong -> "UL" @@ -154,10 +154,10 @@ let make_integral_constant_kind k v = let is_unsigned_kind = function | IBool -> true (* standard says that bool is neither signed nor unsigned, but at some point you have to take sides. *) - | IChar_s | ISChar | IWChar_s | IWSChar -> false + | IChar_s | ISChar | IWChar_s -> false | IChar | IWChar -> Cil.theMachine.theMachine.char_is_unsigned | IShort | IInt -> false - | IChar_u | IUChar | IChar16 | IChar32 | IWChar_u | IWUChar + | IChar_u | IUChar | IChar16 | IChar32 | IWChar_u | IUShort | IUInt -> true | ILong | ILongLong -> false | IULong | IULongLong -> true @@ -601,7 +601,7 @@ let rec convert_base_type env spec decl typ does_remove_virtual = greater size. *) | Int IChar16 -> spec_of_ikind (Cil.intKindForSize 2 true) @ spec, decl | Int IChar32 -> spec_of_ikind (Cil.intKindForSize 4 true) @ spec, decl - | Int (IWChar_u | IWChar_s | IWUChar | IWSChar | IWChar ) -> + | Int (IWChar_u | IWChar_s | IWChar ) -> let wchar_name = { prequalification=[];decl_name="fc_wchar_t"} in let base = if Convert_env.has_typedef env wchar_name then begin diff --git a/convert_acsl.ml b/convert_acsl.ml index 1a64c514a73f256068b433286ebb7826b024c529..cd5be7310ec0336d671d1199690c1e56eccfb0b8 100644 --- a/convert_acsl.ml +++ b/convert_acsl.ml @@ -44,18 +44,12 @@ let convert_logic_label_opt = function let convert_ikind = function | IBool -> Cil_types.IBool - | IChar_u -> Cil_types.IChar - | IChar_s -> Cil_types.IChar + | IChar_u | IChar_s | IChar -> Cil_types.IChar | IUChar -> Cil_types.IUChar | ISChar -> Cil_types.ISChar | IChar16 -> Cil.intKindForSize 2 true | IChar32 -> Cil.intKindForSize 4 true - | IWChar_u - | IWChar_s - | IWUChar - | IWSChar -> Cil.theMachine.Cil.wcharKind - | IChar -> Cil_types.IChar - | IWChar -> Cil.theMachine.Cil.wcharKind + | IWChar_u | IWChar_s | IWChar -> Cil.theMachine.Cil.wcharKind | IShort -> Cil_types.IShort | IUShort -> Cil_types.IUShort | IInt -> Cil_types.IInt diff --git a/fclang_datatype.ml b/fclang_datatype.ml index 1a89bafbd2178fd91c4859d3dae737e062707f95..0e8651e41747edc17aa070c5f5b83a6a729adb80 100644 --- a/fclang_datatype.ml +++ b/fclang_datatype.ml @@ -83,8 +83,6 @@ and pretty_type fmt typ = | IChar32 -> Format.pp_print_string fmt "char32_t" | IWChar_u | IWChar_s -> Format.pp_print_string fmt "wchar_t" - | IWUChar -> Format.pp_print_string fmt "unsigned wchar_t" - | IWSChar -> Format.pp_print_string fmt "signed wchar_t" | IChar -> Format.pp_print_string fmt "char" | IWChar -> Format.pp_print_string fmt "wchar_t" | IShort -> Format.pp_print_string fmt "short" diff --git a/framaCIRGen_src/ACSLLogicType.cpp b/framaCIRGen_src/ACSLLogicType.cpp index 034f23a8b12229ad772c3f48880396f16b7b587a..09d8d6509f8deb3f2a06788d1c81d6781af87e27 100644 --- a/framaCIRGen_src/ACSLLogicType.cpp +++ b/framaCIRGen_src/ACSLLogicType.cpp @@ -36,7 +36,6 @@ bool is_signed(ikind i, Parser::Arguments &context) { case ICHAR_U: case IUCHAR: case IWCHAR_U: - case IWUCHAR: case IUSHORT: case IUINT: case IULONG: @@ -872,8 +871,9 @@ LogicType::readToken(Parser::State& state, Parser::Arguments& arguments) { DefineAddErrorAndParse("'unsigned' meaningless for char16_t") case ICHAR32: DefineAddErrorAndParse("'unsigned' meaningless for char32_t") + case IWCHAR: + DefineAddErrorAndParse("'unsigned' meaningless for wchar_t") case IUCHAR: - case IWUCHAR: case IUSHORT: case IUINT: case IULONG: @@ -882,9 +882,6 @@ LogicType::readToken(Parser::State& state, Parser::Arguments& arguments) { case ICHAR: _typeResult->cons_logic_type.Lint.kind = IUCHAR; break; - case IWCHAR: - _typeResult->cons_logic_type.Lint.kind = IWUCHAR; - break; case ISHORT: _typeResult->cons_logic_type.Lint.kind = IUSHORT; break; @@ -916,8 +913,9 @@ LogicType::readToken(Parser::State& state, Parser::Arguments& arguments) { DefineAddErrorAndParse("'signed' meaningless for char16_t") case ICHAR32: DefineAddErrorAndParse("'signed' meaningless for char32_t") + case IWCHAR: + DefineAddErrorAndParse("'signed' meaningless for wchar_t") case IUCHAR: - case IWUCHAR: case IUSHORT: case IUINT: case IULONG: @@ -925,7 +923,6 @@ LogicType::readToken(Parser::State& state, Parser::Arguments& arguments) { DefineAddErrorAndParse( "mixing 'signed' and 'unsigned' in type specification") case ICHAR: - case IWCHAR: case ISHORT: case ILONG: case ILONGLONG: diff --git a/framaCIRGen_src/ACSLTermOrPredicate.cpp b/framaCIRGen_src/ACSLTermOrPredicate.cpp index 6dbc2d5d3f2a19933c78a651af20c31f1da9bd7c..74a4653cdec6c571d7866321c0dd47523add4870 100644 --- a/framaCIRGen_src/ACSLTermOrPredicate.cpp +++ b/framaCIRGen_src/ACSLTermOrPredicate.cpp @@ -674,7 +674,7 @@ TermOrPredicate::isSignedInteger(logic_type ctype, Parser::Arguments& context) { if (ctype->tag_logic_type == LINT) { ikind kind = ctype->cons_logic_type.Lint.kind; result = (kind == ICHAR_S || kind == ISCHAR || kind == IWCHAR_S - || kind == IWSCHAR || kind == ISHORT || kind == IINT || kind == ILONG); + || kind == ISHORT || kind == IINT || kind == ILONG); } else if (ctype->tag_logic_type == LINTEGER) result = true; diff --git a/intermediate_format.ast b/intermediate_format.ast index 34b149ca1b3ccf7e0fe848bc15f9f28cc3edc9f4..0977d39270a0534a6c4e4e7eab005ee36d02ef94 100644 --- a/intermediate_format.ast +++ b/intermediate_format.ast @@ -33,8 +33,6 @@ type ikind = | IChar32 { } (* char32_t. Same as uint_least32_t *) | IWChar_u { } | IWChar_s { } - | IWUChar { } - | IWSChar { } | IChar { } | IWChar { } | IShort { } diff --git a/mangling.ml b/mangling.ml index 936f417f76297494c730d5b7250c6605dbcc2881..cdb0045107d7880a8a07eb9a0bf88b4f03d87be3 100644 --- a/mangling.ml +++ b/mangling.ml @@ -152,8 +152,6 @@ let mangle_ikind = function | IShort -> "s" | IUShort -> "t" | IWChar | IWChar_s | IWChar_u -> "w" - | IWUChar -> "u6WUChar" - | IWSChar -> "u6WSChar" let mangle_fkind = function | FFloat -> "f"