Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

71 lines
1.4 KiB
Plaintext

== Why is this an issue?
If a re-declaration has compatible types but not types which are token-for-token identical, it may not be clear to which declaration that re-declaration refers.
=== Noncompliant code example
[source,cpp]
----
typedef int32_t INT;
INT i;
extern int32_t i; // Noncompliant
extern void f ( INT );
void f ( int32_t ); // Noncompliant
----
=== Compliant solution
[source,cpp]
----
typedef int32_t INT;
INT i;
extern INT i; // Compliant
extern void f ( INT );
void f ( INT ); // Compliant
----
== Resources
* MISRA {cpp}:2008, 3-9-1
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Replace the type "xxx" to match the previous definition "yyy" in file "zzz" at line "aaa".
'''
== Comments And Links
(visible only on this page)
=== is related to: S1047
=== on 16 Oct 2014, 12:10:21 Ann Campbell wrote:
\[~samuel.mercier] please:
* fill in the appropriate reference field(s).
* provide a See section.
Also, in the message, will it be possible to give a hint about where that previous definition is located? Line # in same file or File name & line #?
=== on 21 Oct 2014, 15:53:50 Samuel Mercier wrote:
Updated the message. We need to check if it can be implemented.
=== on 17 Jul 2015, 11:13:32 Ann Campbell wrote:
\[~evgeny.mandrikov] see if you approve of my title rewording
endif::env-github,rspecator-view[]