MISRA Discussion Forums
is File Include Guard applicable/reviewed with Rule 19.4 ? - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4)
+--- Forum: MISRA-C: 2004 rules (https://forum.misra.org.uk/forumdisplay.php?fid=17)
+---- Forum: 6.19 Preprocessing Directives (https://forum.misra.org.uk/forumdisplay.php?fid=43)
+---- Thread: is File Include Guard applicable/reviewed with Rule 19.4 ? (/showthread.php?tid=1082)



is File Include Guard applicable/reviewed with Rule 19.4 ? - edgartorres0523 - 18-07-2014

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


Re: is File Include Guard applicable/reviewed with Rule 19.4 - misra-c - 22-08-2014

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