Why is this an issue?
If the '
, \
, "
or /*
characters are used between <
and >
delimiters or the '
, \
or /*
characters are used between the "
delimiters in a header name
preprocessing token, then the behavior is undefined.
Noncompliant code example
#include <"foo"> // Noncompliant
#include "dir\foo.h" // Noncompliant
Resources
- MISRA C:2004, 19.2 - Non-standard characters should not occur in header file names in #include directives.
- MISRA C++:2008, 16-2-4 - The ', ", /* or // characters shall not occur in a header file name.
- MISRA C++:2008, 16-2-5 - The \ character should not occur in a header file name.
- MISRA C:2012, 20.2 - The ', " or \ characters and the /* or // character sequences shall not occur in a header file name