From 65010f8c68ebb52e4243921d6a1f4a043a6eff8a Mon Sep 17 00:00:00 2001 From: Botond Baranyi <botond.baranyi@ericsson.com> Date: Thu, 16 Aug 2018 10:24:26 +0200 Subject: [PATCH] Changed the OER signed setting's default value from 'false' to 'true' Change-Id: I439caa5313b0341bc07a99259f3ea836587759c1 Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com> --- compiler2/Type_chk.cc | 2 +- compiler2/ttcn3/OerAST.cc | 4 ++-- core/OER.cc | 42 +++++++++++++++++++-------------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/compiler2/Type_chk.cc b/compiler2/Type_chk.cc index 2a1a53508..992567845 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 a22db7b69..0fb80c2dc 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 3a233364c..ac17d6d5e 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 -- GitLab