MISRA Discussion Forums

Full Version: in the Example Suite, D_04_02.c
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In MISRA C:2012 Examples Suite, D_04_02.c has no function.
If you compile D_04_support.c or D_04_system.c then a link error should be occured.

For example, at LLVM(clang)
"_D_4_2", referenced from:
_D_4_main_support in D_04_support.o
_main in D_04_system.o
ld: symbol(s) not found

You could compile with adding a function D_4_2(){} in D_04_02.c or removing D_4_2( ); in D_04_support.c and D_04_system.c.

In the Example suite, xx_system call xx_support, but both of them have same individual function calls.
it may be redundant.

Dr. OGAWA Kiyoshi
You are correct that the following functions have a declaration, but no definition
This will be corrected in a later version of the Example suite, by removing them from the support and system files.

The inclusion of the same individual function calls in xx_system and xx_support was intentional. One aim when producing the Example suite was to minimize the violations of other rules. The presence of calls of externally declared function in two different files means that the number rule 8.7 violations is minimised.