27-06-2014, 07:39 AM
Assuming an example such as:
"p_arg" will violate rule 5.2. Identifiers with "function prototype" scope are considered to be in an "inner scope" compared to the "outer scope" of "file" scope. Note: This example will also violate rule 5.7
"function prototype" scope is defined in section 6.1.2.1 on the C90 standard.
Code:
void * p_arg;
extern void SerialMaster_task(void *p_arg); /* no definition in translation unit */
"function prototype" scope is defined in section 6.1.2.1 on the C90 standard.
Quote:There are four kinds of scopes: function, file block and function prototype. ( A function prototype is a declaration of a function that declares the types of its parameters.)
Posted by and on behalf of the MISRA C Working Group