MISRA Discussion Forums

Full Version: Inlcude rule 19.11
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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?