GCC prior to 4.8 does not supprot -Wpedantic.
See https://gcc.gnu.org/gcc-4.8/changes.html
The travis-ci currently builds with gcc-4.6.3
$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Link asn1c/tests with libasn1cskeletons.a in order to improve
skeletons coverage. When the skeleton files are copied the lcov will
report coverage for each copy separatly.
To generate the code coverage report you need gcov and lcov installed
and then execute
./configure --enable-code-coverage
make check-code-coverage
Writing directory view page.
Overall coverage rate:
lines......: 76.5% (10519 of 13759 lines)
functions..: 85.5% (491 of 574 functions)
branches...: 57.5% (7040 of 12250 branches)
file:///home/user/asn1c/asn1c-0.9.28-coverage/index.html
Open the index.html with a web browser
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'.
The old test was not working at all and was failing on both 32 and 64
bit systems with
configure:13545: checking size of long is longer than 32 bit
configure:13561: gcc -c -g -O2 -Wall -Wcast-qual -Wchar-subscripts
-Wmissing-prototypes -Wmissing-declarations -Wno-error=cast-align
conftest.c >&5
conftest.c: In function 'main':
conftest.c:32:34: error: 'dummy' undeclared (first use in this function)
switch (0) case 0: case (sizeof (dummy) >= 8):;
^
conftest.c:32:34: note: each undeclared identifier is reported only once
for each function it appears in
1. Add 'ref_cnt' field to asn1p_expr_t.
2. Initialize 'ref_cnt' field to zero when asn1p_expr_t is allocated.
3. Increase 'ref_cnt' field when asn1p_expr_t is cloned by asn1p_value_fromtype().
4. If 'ref_cnt' field of asn1p_expr_t is larger than zero, then asn1p_expr_free() only decrease its value.
5. Free memory pointed by fields of asn1p_expr_t and itself when 'ref_cnt' is zero and asn1p_expr_free() called.
6. Call asn1p_delete(asn) in main().