1# MISRA-C Deviations {#coreMISRA_Exceptions_pg}
2
3CMSIS-Core (Cortex-M) uses the common coding rules for CMSIS components that are documented in [CMSIS Introduction](../General/index.html).
4
5CMSIS-Core (Cortex-M) violates the following MISRA-C:2012 rules:
6
7 - Directive 4.2, All usage of assembly language should be documented
8   - CMSIS-Core uses assembly statements to access core registers on several places. These locations start with __ASM.
9   - Inline assembly statements my be opaque to MISRA Checkers and can cause false-positive warnings.
10
11 - Directive 4.9, function-like macro defined.
12   - Violated since function-like macros are used to generate more efficient code.
13
14 - Rule 1.3, multiple use of '#/##' operators in macro definition.
15   - Violated since function-like macros are used to generate more efficient code.
16
17 - Rule 11.4, conversion between a pointer and integer type.
18   - Violated because of core register access.
19
20 - Rule 11.6, cast from unsigned long to pointer.
21   - Violated because of core register access.
22
23 - Rule 13.5, side effects on right hand side of logical operator.
24   - Violated because of shift operand is used in macros and functions.
25
26 - Rule 14.4, conditional expression should have essentially Boolean type.
27   - Violated since macros with several instructions are used.
28
29 - Rule 15.5, return statement before end of function.
30   - Violated to simplify code logic.
31
32 - Rule 20.10, '#/##' operators used.
33   - Violated since function-like macros are used to generate more efficient code.
34
35 - Rules 21.1 and 21.2, reserved to the compiler.
36   - Violated since macros with leading underscores are used.
37