diff --git a/compiler2/Type_chk.cc b/compiler2/Type_chk.cc index 2a1a53508cecee73d52a7cf4bc2ca181fbab2bfc..992567845a6fb94aab570ce07790b0c9e24a26b3 100644 --- a/compiler2/Type_chk.cc +++ b/compiler2/Type_chk.cc @@ -3059,7 +3059,7 @@ void Type::chk_oer() { bool lower_inf = lower.get_type() != int_limit_t::NUMBER; bool upper_inf = upper.get_type() != int_limit_t::NUMBER; if (lower_inf || upper_inf) { - oerattrib->signed_ = lower_inf; + oerattrib->signed_ = lower_inf || lower.get_value() < 0; oerattrib->bytes = -1; } else { int_val_t low = lower.get_value(); diff --git a/compiler2/ttcn3/OerAST.cc b/compiler2/ttcn3/OerAST.cc index a22db7b691aa14cc767053e35c13f4e16746a9c9..0fb80c2dcbe743f71481e35d12c651d096894f86 100644 --- a/compiler2/ttcn3/OerAST.cc +++ b/compiler2/ttcn3/OerAST.cc @@ -13,7 +13,7 @@ OerAST::OerAST() : bytes(-1), - signed_(false), + signed_(true), length(-1), extendable(false), nr_of_root_comps(0), @@ -33,6 +33,6 @@ OerAST::~OerAST() { } bool OerAST::empty() const { - return bytes == -1 && signed_ == false && length == -1 && + return bytes == -1 && signed_ == true && length == -1 && extendable == false && nr_of_root_comps == 0 && ext_attr_groups.empty() && p.empty(); } diff --git a/core/OER.cc b/core/OER.cc index 3a233364c242483757e07018d121efaac144fa51..ac17d6d5ec3e8d8bc8707370ecbf18012ab0126f 100644 --- a/core/OER.cc +++ b/core/OER.cc @@ -159,46 +159,46 @@ ASN_Tag_t decode_oer_tag(TTCN_Buffer& buf) { return tag; } -const TTCN_OERdescriptor_t BOOLEAN_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t BOOLEAN_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_OERdescriptor_t INTEGER_oer_ = { -1, TRUE, 0, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t BITSTRING_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t BITSTRING_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t OCTETSTRING_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL , 0, NULL}; +const TTCN_OERdescriptor_t OCTETSTRING_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL , 0, NULL}; -const TTCN_OERdescriptor_t FLOAT_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t FLOAT_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t ASN_NULL_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t ASN_NULL_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t IA5String_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t IA5String_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t VisibleString_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t VisibleString_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t NumericString_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t NumericString_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t PrintableString_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t PrintableString_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t BMPString_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t BMPString_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t UniversalString_oer_ = { 0, FALSE, -1, FALSE , 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t UniversalString_oer_ = { 0, TRUE, -1, FALSE , 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t UTF8String_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t UTF8String_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t TeletexString_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL , 0, NULL}; +const TTCN_OERdescriptor_t TeletexString_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL , 0, NULL}; -const TTCN_OERdescriptor_t VideotexString_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t VideotexString_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t GraphicString_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t GraphicString_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t GeneralString_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t GeneralString_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t OBJID_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t OBJID_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t ASN_ROID_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t ASN_ROID_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t EMBEDDED_PDV_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t EMBEDDED_PDV_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t EXTERNAL_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; +const TTCN_OERdescriptor_t EXTERNAL_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; -const TTCN_OERdescriptor_t ObjectDescriptor_oer_ = { 0, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; \ No newline at end of file +const TTCN_OERdescriptor_t ObjectDescriptor_oer_ = { 0, TRUE, -1, FALSE, 0, 0, NULL, 0, NULL }; \ No newline at end of file