Commit 8ecf9db1 authored by Lev Walkin's avatar Lev Walkin

INTEGER prohibited by 8.3.4

parent 6cf9f716
...@@ -116,11 +116,13 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) { ...@@ -116,11 +116,13 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
v2e = alloca((el_count + 1) * sizeof(*v2e)); v2e = alloca((el_count + 1) * sizeof(*v2e));
/* /*
* For all ENUMERATED types and for those INTEGER types which * For all ENUMERATED types [and for those INTEGER types which
* have identifiers, print out an enumeration table and a mapping * have identifiers -- prohibited by X.693:8.3.4],
* print out an enumeration table and a mapping
* between identifiers and associated values. * between identifiers and associated values.
*/ */
if(expr->expr_type == ASN_BASIC_ENUMERATED || el_count) { if(expr->expr_type == ASN_BASIC_ENUMERATED
|| (0 && el_count /* -- prohibited by X.693:8.3.4 */)) {
int eidx = 0; int eidx = 0;
REDIR(OT_DEPS); REDIR(OT_DEPS);
...@@ -561,8 +563,9 @@ asn1c_lang_C_type_SEx_OF(arg_t *arg) { ...@@ -561,8 +563,9 @@ asn1c_lang_C_type_SEx_OF(arg_t *arg) {
? "SET" : "SEQUENCE"); ? "SET" : "SEQUENCE");
if(memb->expr_type & ASN_CONSTR_MASK if(memb->expr_type & ASN_CONSTR_MASK
|| ((memb->expr_type == ASN_BASIC_ENUMERATED || ((memb->expr_type == ASN_BASIC_ENUMERATED
|| memb->expr_type == ASN_BASIC_INTEGER) || (0 /* -- prohibited by X.693:8.3.4 */
&& expr_elements_count(arg, memb))) { && memb->expr_type == ASN_BASIC_INTEGER))
&& expr_elements_count(arg, memb))) {
arg_t tmp; arg_t tmp;
asn1p_expr_t tmp_memb; asn1p_expr_t tmp_memb;
arg->embed++; arg->embed++;
...@@ -918,7 +921,8 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) { ...@@ -918,7 +921,8 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
} }
if((expr->expr_type == ASN_BASIC_ENUMERATED) if((expr->expr_type == ASN_BASIC_ENUMERATED)
|| (expr->expr_type == ASN_BASIC_INTEGER || (0 /* -- prohibited by X.693:8.3.4 */
&& expr->expr_type == ASN_BASIC_INTEGER
&& expr_elements_count(arg, expr))) && expr_elements_count(arg, expr)))
etd_spec = ETD_HAS_SPECIFICS; etd_spec = ETD_HAS_SPECIFICS;
else else
...@@ -1561,7 +1565,8 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) { ...@@ -1561,7 +1565,8 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
complex_contents = complex_contents =
(expr->expr_type & ASN_CONSTR_MASK) (expr->expr_type & ASN_CONSTR_MASK)
|| expr->expr_type == ASN_BASIC_ENUMERATED || expr->expr_type == ASN_BASIC_ENUMERATED
|| (expr->expr_type == ASN_BASIC_INTEGER || (0 /* -- prohibited by X.693:8.3.4 */
&& expr->expr_type == ASN_BASIC_INTEGER
&& expr_elements_count(arg, expr)); && expr_elements_count(arg, expr));
if(C99_MODE) OUT(".type = "); if(C99_MODE) OUT(".type = ");
if(complex_contents if(complex_contents
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment