Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
8.3 and parameter name omitted.
#1
Would the following examples be compliant with rule #8.3?
Code:
-- in t1.h
extern int foo(int);

-- t2.c
#include "t1.h"

int foo(int value) {  // here(parameter name do not match)
}
<t></t>
Reply
#2
The extern declaration of foo is not compliant with rule 8.2, which requires function declarations to have named parameters.

The MISRA-C working group is currently considering whether rule 8.3 includes the case where the declaration has no parameter name and definition does have a parameter name.
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)