Rule 3.6: Reserved words and standard library function names

6.3 Documentation

Moderators: misra-c, david ward

Locked
tria1312
Posts: 1
Joined: Wed Mar 12, 2008 7:55 am

Rule 3.6: Reserved words and standard library function names

Post by tria1312 » Wed Mar 12, 2008 11:39 am

Hi,

I'm using a tool from the USA called codechk.

When performing check on my code I get this message:

Code: Select all

u16_t f29( void );
error: (REQUIRED) MISRA rule 116 ( 3.6 ) violated: Reserved words and standard library function names shall not be used { DECL }
But I dont see any reserved words or standard library function names. Can anyone help me out? Do you need some more code or infos?


Bjoern
Attachments
TestDriver.c
(317 Bytes) Downloaded 1173 times

MMouse
Posts: 18
Joined: Thu Jul 05, 2007 12:20 am
Company: Disney
Location: Florida
Contact:

Rule 3.6 and codechk

Post by MMouse » Thu Mar 13, 2008 10:21 am

I think you are asking the question in the wrong place.

Ask the Codechk people why their tool is wrong....

The words quoted inthe error message are not the correct rule words.. This indicates they may not have authorisation to use the actual words

DO you have a link to this tool?

sparker
Posts: 13
Joined: Thu Apr 28, 2005 2:05 pm
Location: Cambrige, UK

Re: Rule 3.6: Reserved words and standard library function n

Post by sparker » Fri Mar 14, 2008 9:17 am

tria1312 wrote:

Code: Select all

u16_t f29( void );
But I dont see any reserved words or standard library function names.
I wonder if they are thinking of the C99 wording (in 7.2.6 "Future Library Directions").
ISO/IEC 9899:1999 wrote:The following names are grouped under individual headers for convenience. All external
names described below are reserved no matter what headers are included by the program.
and in section 7.26.8 "Integer types <stdint.h>"
ISO/IEC 9899:1999 wrote:Typedef names beginning with int or uint and ending with _t may be added to the
types defined in the <stdint.h> header.
Alternatively they may be thinking of the POSIX reservation of _t names.

stephen

MMouse
Posts: 18
Joined: Thu Jul 05, 2007 12:20 am
Company: Disney
Location: Florida
Contact:

Post by MMouse » Fri Mar 14, 2008 9:27 am

Without more information on the tool all we can do is speculate.

However any tool that is using C99 and POSIX rules and claiming to check for MISRA-C in this fashion is to say the least dubious.

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

Re: Rule 3.6: Reserved words and standard library function names

Post by misra-c » Wed May 21, 2008 2:29 pm

From the information posted, we cannot see any violations of Rule 3.6 in this code.

Please follow this up with the tool vendor.
---
Posted by and on behalf of
the MISRA C Working Group

Locked

Return to “6.3 Documentation”