Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
2012 / MISRA / EW_MisraCReference.pdf
Скачиваний:
139
Добавлен:
10.02.2015
Размер:
650.9 Кб
Скачать

Comments

Comments

The rules in this section are concerned with the use of comments in the code.

Rule 9 (required) Comments shall not be nested.

How the rule is checked

The compiler will generate an error, indicating a violation of this rule, if /* is used inside a comment.

Rule 10 (advisory) Sections of code should not be ‘commented out’.

How the rule is checked

The compiler will generate an error, indicating a violation of this rule, whenever a comment ends with ;, {, or }.

Note: This rule is checked in such a manner that code samples inside comments are allowed and do not generate an error.

Identifiers

The rules in this section are concerned with identifiers used in the code.

Rule 11 (required) Identifiers (internal and external) shall not rely on significance of more than 31 characters. Furthermore, the compiler/linker shall be checked to ensure that 31 character significance and case sensitivity are supported for external identifiers.

How the rule is checked

The linker will generate an error, indicating a violation of this rule, if any identifiers have the same 31 initial characters.

The compiler will generate an error, indicating a violation of this rule, in a declaration or definition of an identifier if it has the same 31 initial characters as a previously declared or defined identifier.

IAR Embedded Workbench® MISRA C

20 Reference Guide

Соседние файлы в папке MISRA