Use reserved identifier as input parameter of function

Moderators: misra-c, david ward

Post Reply
lai56
Posts: 1
Joined: Wed Sep 16, 2015 9:00 pm
Company: bosch

Use reserved identifier as input parameter of function

Post by lai56 » Tue Apr 25, 2017 7:25 am

Hello,

It is defined in the Rule 21.2 that reserved identifier from standard library should not be used.

I have following example for a function definition.
void func_a (uint8 time)

time is reserved identifier from time.h, but it is used as input paramter for the function syntax. does it violate the rule 21.2?

Thanks
Lai

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

Re: Use reserved identifier as input parameter of function

Post by misra-c » Wed Jun 14, 2017 9:15 am

Yes, your example does violate rule 21.2.
---
Posted by and on behalf of
the MISRA C Working Group

Post Reply

Return to “8.21 Standard libraries”