Bad code generation for constructed type after SET OF
Go to github.com/vlm/asn1c for the latest version.
Brought to you by:
vlm
This problem exists for SEQUENCE OF as well, but the summary character limit wouldn't let me say that.
If you have, e.g.,
MyType ::= SET OF SEQUENCE { a INTEGER, b BOOLEAN }
The code that gets generated is not generally compilable. The A_SET_OF macro gets a fully defined structured passed into it.
I fixed this locally by creating an intermediate type in the compiler. I will attach a diff.
My sandbox is diverging dramatically from the SVN version as I have asn1c compiling on Windows/Sun/HP/Linux/AIX with native compilers, and I will no longer be able to provide meaningful patches that can simply be applied.
I will be providing a cvs context diff of my local copy. You can figure out how to apply it to your own sandbox.
Diff to create intermediate type
Logged In: YES
user_id=1932039
Originator: YES
Attached is a diff from my source tree.
Note that the asn1p_y.y was changed. You'll need to remove asn1p_y.c to force it to rebuild.
File Added: setof_intermediate.diff