MISRA Discussion Forums

Full Version: is File Include Guard applicable/reviewed with Rule 19.4 ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi team,
First of all, I want to thank you for supporting people with this amazing forum that is very useful , "Thumbs up".

I have the following File Include Guard:
#ifndef _MYHEADER_H_ // beginning
#define _MYHEADER_H_
...
#endif // end

My question is if File Include Guards have to be applicable/reviewed with the MISRA-C:2004 Rule 19.4 ?

Thanks and Best Regards.
edgartorres0523
We agree that it is unclear whether the following line violates rule 19.4.
Quote:#define _MYHEADER_H_

The intention was that C macros with empty replacement lists should be permitted, as is shown in the example for rule 19.15