8.3 and parameter name omitted.

Moderators: misra-c, david ward

Post Reply
lovewar
Posts: 10
Joined: Thu Feb 17, 2011 8:01 am
Company: .

8.3 and parameter name omitted.

Post by lovewar » Wed Jul 01, 2015 8:29 am

Would the following examples be compliant with rule #8.3?

Code: Select all

-- in t1.h
extern int foo(int);

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

int foo(int value) {  // here(parameter name do not match)
}

misra-c
Posts: 571
Joined: Thu Jan 05, 2006 1:11 pm

Re: 8.3 and parameter name omitted.

Post by misra-c » Wed Aug 05, 2015 8:55 am

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

Post Reply

Return to “8.8 Declarations and defnitions”