Rule 20.3 space after #include

Moderators: misra-c, david ward

Post Reply
misra-c
Posts: 572
Joined: Thu Jan 05, 2006 1:11 pm

Rule 20.3 space after #include

Post by misra-c » Fri Feb 13, 2015 12:36 pm

The amplification to rule 20.3 states that the rule applies "after macro replacement" has been performed. Is the number/absence of spaces and comments between #include and the " or < irrelevant?

So for example:

Code: Select all

#include<file.h>              /* no space - compliant ? */
#include/* comment*/ <file.h> /* compliant  ? */.
---
Posted by and on behalf of
the MISRA C Working Group

misra-c
Posts: 572
Joined: Thu Jan 05, 2006 1:11 pm

Re: Rule 20.3 space after #include

Post by misra-c » Fri Feb 13, 2015 12:38 pm

The number or absence of spaces and comments are irrelevant. Both examples are compliant.
---
Posted by and on behalf of
the MISRA C Working Group

Post Reply

Return to “8.20 Preprocessing directives”