rspec/rules/S975/rule.adoc

38 lines
846 B
Plaintext
Raw Normal View History

== Why is this an issue?
It is undefined behavior if the '\' character is used between ``++<++`` and ``++>++`` delimiters or between the ``++"++`` delimiters in a header name preprocessing token.
Note that this rule is only advisory, since some environments use '\' as a file name delimiter. However, compilers for those environments often support the use of '/' in ``++#include++`` directives.
=== Noncompliant code example
2022-02-04 17:28:24 +01:00
[source,text]
----
#include "foo\bar.h" /* Noncompliant */
----
=== Compliant solution
2022-02-04 17:28:24 +01:00
[source,text]
----
#include "foo/bar.h" /* Compliant */
----
== Resources
* MISRA {cpp}:2008, 16-2-5 - The \ character should not occur in a header file name.
2022-01-25 18:36:46 +01:00
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]