MISRA Discussion Forums
Inlcude rule 19.11 - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA Autocode (https://forum.misra.org.uk/forumdisplay.php?fid=8)
+--- Forum: MISRA AC AGC discussions (https://forum.misra.org.uk/forumdisplay.php?fid=119)
+--- Thread: Inlcude rule 19.11 (/showthread.php?tid=837)



Inlcude rule 19.11 - ggentile - 01-08-2011

Rule 19.11
Double include protection. This rule is still OBL also for AC. May you provide some more detail on the rationale behind the necessity for this rules ?

best regards
Giacomo


Re: Inlcude rule 19.11 - Steve Montgomery - 12-08-2011

Rule 19.11 allows any of:

Code:
#ifdef FILE_H
#ifndef FILE_H
#if ! defined(FILE_H)
so it is possible to protect against double inclusion without breaking Rule 19.11

Does this answer your question? If not, could you provide some more information please?