Inlcude rule 19.11

Forum for discussing and asking questions about the MISRA document MISRA AC AGC "Guidelines for the application of MISRA-C:2004 in the context of automatic code generation"

Moderators: david ward, GeoffFrost

Post Reply
Posts: 16
Joined: Wed Nov 25, 2009 8:04 pm
Company: UTC UTRC

Inlcude rule 19.11

Post by ggentile » Mon Aug 01, 2011 5:55 pm

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

Steve Montgomery
Posts: 104
Joined: Fri Sep 17, 2004 1:31 pm
Company: .
Location: Northumberland or Isle of Skye

Re: Inlcude rule 19.11

Post by Steve Montgomery » Fri Aug 12, 2011 9:23 am

Rule 19.11 allows any of:

Code: Select all

#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?

Post Reply

Return to “MISRA AC AGC discussions”