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/forum-8.html)
+--- Forum: MISRA AC AGC discussions (https://forum.misra.org.uk/forum-119.html)
+--- Thread: Inlcude rule 19.11 (/thread-837.html)



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?