Fix 'declaration inside parameter list' warning
1. Add forward definition section.
2. Move type definition inside A_SEQUENCE_OF() to forward definition section.
3. Modify asn1c_lang_C_type_CHOICE() ...etc functions to achieve it.
4. Modify test cases used during 'make check'.
diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c
index f8348cc..5b945b7 100644
--- a/libasn1compiler/asn1c_save.c
+++ b/libasn1compiler/asn1c_save.c
@@ -283,6 +283,7 @@
safe_fprintf(fp_h, "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n");
SAVE_STREAM(fp_h, OT_DEPS, "Dependencies", 0);
SAVE_STREAM(fp_h, OT_FWD_DECLS, "Forward declarations", 0);
+ SAVE_STREAM(fp_h, OT_FWD_DEFS, "Forward definitions", 0);
SAVE_STREAM(fp_h, OT_TYPE_DECLS, expr->Identifier, 0);
SAVE_STREAM(fp_h, OT_FUNC_DECLS,"Implementation", 0);
safe_fprintf(fp_h, "\n#ifdef __cplusplus\n}\n#endif\n");
@@ -305,7 +306,7 @@
TQ_FOR(ot, &(cs->destination[OT_STAT_DEFS].chunks), next)
safe_fwrite(ot->buf, ot->len, 1, fp_c);
- assert(OT_MAX == 11); /* Protection from reckless changes */
+ assert(OT_MAX == 12); /* Protection from reckless changes */
fclose(fp_c);
fclose(fp_h);