Lines Matching +full:non +full:- +full:standard
10 The coding guideline rules are based on MISRA-C 2012 and are a **subset** of MISRA-C.
18 available through the project. If you need a copy of MISRA-C 2012, please
24 .. list-table:: Main rules
25 :header-rows: 1
28 * - Zephyr rule
29 - Description
30 - MISRA-C 2012 rule
31 - MISRA-C severity
32 - CERT C reference
35 * - 1
36 …- Any implementation-defined behaviour on which the output of the program depends shall be docume…
37 …- `Dir 1.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_01_01.c>`_
38 - Required
39 …- `MSC09-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC09-C.+Character+encoding%3A+Use+subs…
42 * - 2
43 - All source files shall compile without any compilation errors
44 …- `Dir 2.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_02_01.c>`_
45 - Required
46 - N/A
49 * - 3
50 - All code shall be traceable to documented requirements
51 …- `Dir 3.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_03_01.c>`_
52 - Required
53 - N/A
56 * - 4
57 - Run-time failures shall be minimized
58 …- `Dir 4.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_01.c>`_
59 - Required
60 - N/A
63 * - 5
64 - All usage of assembly language should be documented
65 …- `Dir 4.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_02.c>`_
66 - Advisory
67 - N/A
70 * - 6
71 - Sections of code should not be “commented out”
72 …- `Dir 4.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_04.c>`_
73 - Advisory
74 …- `MSC04-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC04-C.+Use+comments+consistently+and+…
77 * - 7
78 …- Identifiers in the same name space with overlapping visibility should be typographically unambi…
79 …- `Dir 4.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_05.c>`_
80 - Advisory
81 …- `DCL02-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL02-C.+Use+visually+distinct+identifi…
84 * - 8
85 … - typedefs that indicate size and signedness should be used in place of the basic numerical types
86 …- `Dir 4.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_06.c>`_
87 - Advisory
88 - N/A
91 * - 9
92 - If a function returns error information, then that error information shall be tested
93 …- `Dir 4.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_07.c>`_
94 - Required
95 - N/A
98 * - 10
99 …- If a pointer to a structure or union is never dereferenced within a translation unit, then the …
100 …- | `Dir 4.8 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master…
101 …| `Dir 4.8 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_…
102 - Advisory
103 …- `DCL12-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL12-C.+Implement+abstract+data+types+…
106 * - 11
107 … - A function should be used in preference to a function-like macro where they are interchangeable
108 …- `Dir 4.9 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_09.c>`_
109 - Advisory
110 …- `PRE00-C <https://wiki.sei.cmu.edu/confluence/display/c/PRE00-C.+Prefer+inline+or+static+functi…
113 * - 12
114 …- Precautions shall be taken in order to prevent the contents of a header file being included mor…
115 …- `Dir 4.10 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_10.c>…
116 - Required
117 …- `PRE06-C <https://wiki.sei.cmu.edu/confluence/display/c/PRE06-C.+Enclose+header+files+in+an+inc…
120 * - 13
121 - The validity of values passed to library functions shall be checked
122 …- `Dir 4.11 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_11.c>…
123 - Required
124 - N/A
127 * - 14
128 - Dynamic memory allocation shall not be used
129 …- `Dir 4.12 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_12.c>…
130 - Required
131 …- `STR01-C <https://wiki.sei.cmu.edu/confluence/display/c/STR01-C.+Adopt+and+implement+a+consiste…
134 * - 15
135 …- Functions which are designed to provide operations on a resource should be called in an appropr…
136 …- `Dir 4.13 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_13.c>…
137 - Advisory
138 - N/A
141 * - 16
142 - The validity of values received from external sources shall be checked
143 …- `Dir 4.14 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/D_04_14.c>…
144 - Required
145 - N/A
148 * - 17
149 - Language extensions should not be used
150 …- `Rule 1.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_01_02.c>…
151 - Advisory
152 …- `MSC04-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC04-C.+Use+comments+consistently+and+…
155 * - 18
156 - There shall be no occurrence of undefined or critical unspecified behaviour
157 …- `Rule 1.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_01_03.c>…
158 - Required
159 - N/A
162 * - 19
163 - A project shall not contain unreachable code
164 …- | `Rule 2.1 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/maste…
165 …| `Rule 2.1 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R…
166 - Required
167 … - `MSC07-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC07-C.+Detect+and+remove+dead+code>`_
170 * - 20
171 - There shall be no dead code
172 …- `Rule 2.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_02.c>…
173 - Required
174 …- `MSC12-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC12-C.+Detect+and+remove+code+that+ha…
177 * - 21
178 - A project should not contain unused type declarations
179 …- `Rule 2.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_03.c>…
180 - Advisory
181 - N/A
184 * - 22
185 - A function should not contain unused label declarations
186 …- `Rule 2.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_06.c>…
187 - Advisory
188 - N/A
191 * - 23
192 - There should be no unused parameters in functions
193 …- `Rule 2.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_07.c>…
194 - Advisory
195 - N/A
198 * - 24
199 - The character sequences /* and // shall not be used within a comment
200 …- `Rule 3.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_03_01.c>…
201 - Required
202 …- `MSC04-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC04-C.+Use+comments+consistently+and+…
205 * - 25
206 - Line-splicing shall not be used in // comments
207 …- `Rule 3.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_03_02.c>…
208 - Required
209 - N/A
212 * - 26
213 - Octal and hexadecimal escape sequences shall be terminated
214 …- `Rule 4.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_04_01.c>…
215 - Required
216 …- `MSC09-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC09-C.+Character+encoding%3A+Use+subs…
219 * - 27
220 - Trigraphs should not be used
221 …- `Rule 4.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_04_02.c>…
222 - Advisory
223 …- `PRE07-C <https://wiki.sei.cmu.edu/confluence/display/c/PRE07-C.+Avoid+using+repeated+question+…
226 * - 28
227 - External identifiers shall be distinct
228 …- | `Rule 5.1 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/maste…
229 …| `Rule 5.1 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R…
230 - Required
231 …- `DCL23-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL23-C.+Guarantee+that+mutually+visibl…
234 * - 29
235 - Identifiers declared in the same scope and name space shall be distinct
236 …- `Rule 5.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_02.c>…
237 - Required
238 …- `DCL23-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL23-C.+Guarantee+that+mutually+visibl…
241 * - 30
242 …- An identifier declared in an inner scope shall not hide an identifier declared in an outer scope
243 …- `Rule 5.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_03.c>…
244 - Required
245 …- `DCL23-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL23-C.+Guarantee+that+mutually+visibl…
248 * - 31
249 - Macro identifiers shall be distinct
250 …- `Rule 5.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_04.c>…
251 - Required
252 …- `DCL23-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL23-C.+Guarantee+that+mutually+visibl…
255 * - 32
256 - Identifiers shall be distinct from macro names
257 …- `Rule 5.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_05.c>…
258 - Required
259 …- `DCL23-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL23-C.+Guarantee+that+mutually+visibl…
262 * - 33
263 - A typedef name shall be a unique identifier
264 …- `Rule 5.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_06.c>…
265 - Required
266 - N/A
269 * - 34
270 - A tag name shall be a unique identifier
271 …- `Rule 5.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_07.c>…
272 - Required
273 - N/A
276 * - 35
277 - Identifiers that define objects or functions with external linkage shall be unique
278 …- | `Rule 5.8 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/maste…
279 …| `Rule 5.8 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R…
280 - Required
281 - N/A
284 * - 36
285 - Identifiers that define objects or functions with internal linkage should be unique
286 …- | `Rule 5.9 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/maste…
287 …| `Rule 5.9 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R…
288 - Advisory
289 - N/A
292 * - 37
293 - Bit-fields shall only be declared with an appropriate type
294 …- `Rule 6.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_06_01.c>…
295 - Required
296 …- `INT14-C <https://wiki.sei.cmu.edu/confluence/display/c/INT14-C.+Avoid+performing+bitwise+and+a…
299 * - 38
300 - Single-bit named bit fields shall not be of a signed type
301 …- `Rule 6.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_06_02.c>…
302 - Required
303 …- `INT14-C <https://wiki.sei.cmu.edu/confluence/display/c/INT14-C.+Avoid+performing+bitwise+and+a…
306 * - 39
307 - Octal constants shall not be used
308 …- `Rule 7.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_01.c>…
309 - Required
310 …- `DCL18-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL18-C.+Do+not+begin+integer+constants…
313 * - 40
314 …- A u or U suffix shall be applied to all integer constants that are represented in an unsigned t…
315 …- `Rule 7.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_02.c>…
316 - Required
317 - N/A
320 * - 41
321 - The lowercase character l shall not be used in a literal suffix
322 …- `Rule 7.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_03.c>…
323 - Required
324 - `DCL16-C <https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152241>`_
327 * - 42
328 …- A string literal shall not be assigned to an object unless the objects type is pointer to const…
329 …- `Rule 7.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_04.c>…
330 - Required
331 - N/A
334 * - 43
335 - Types shall be explicitly specified
336 …- `Rule 8.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_01.c>…
337 - Required
338 - N/A
341 * - 44
342 - Function types shall be in prototype form with named parameters
343 …- `Rule 8.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_02.c>…
344 - Required
345 …- `DCL20-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL20-C.+Explicitly+specify+void+when+a…
348 * - 45
349 - All declarations of an object or function shall use the same names and type qualifiers
350 …- `Rule 8.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_03.c>…
351 - Required
352 - N/A
355 * - 46
356 …- A compatible declaration shall be visible when an object or function with external linkage is d…
357 …- `Rule 8.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_04.c>…
358 - Required
359 - N/A
362 * - 47
363 - An external object or function shall be declared once in one and only one file
364 …- | `Rule 8.5 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/maste…
365 …| `Rule 8.5 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R…
366 - Required
367 - N/A
370 * - 48
371 - An identifier with external linkage shall have exactly one external definition
372 …- | `Rule 8.6 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/maste…
373 …| `Rule 8.6 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R…
374 - Required
375 - N/A
378 * - 49
379 …- The static storage class specifier shall be used in all declarations of objects and functions t…
380 …- `Rule 8.8 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_08.c>…
381 - Required
382 …- `DCL15-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL15-C.+Declare+file-scope+objects+or+…
385 * - 50
386 … - An object should be defined at block scope if its identifier only appears in a single function
387 …- `Rule 8.9 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_09.c>…
388 - Advisory
389 …- `DCL19-C <https://wiki.sei.cmu.edu/confluence/display/c/DCL19-C.+Minimize+the+scope+of+variable…
392 * - 51
393 - An inline function shall be declared with the static storage class
394 …- `Rule 8.10 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_10.c…
395 - Required
396 - N/A
399 * - 52
400 …- Within an enumerator list, the value of an implicitly-specified enumeration constant shall be u…
401 …- `Rule 8.12 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_12.c…
402 - Required
403 …- `INT09-C <https://wiki.sei.cmu.edu/confluence/display/c/INT09-C.+Ensure+enumeration+constants+m…
406 * - 53
407 - The restrict type qualifier shall not be used
408 …- `Rule 8.14 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_08_14.c…
409 - Required
410 - N/A
413 * - 54
414 … - The value of an object with automatic storage duration shall not be read before it has been set
415 …- `Rule 9.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_09_01.c>…
416 - Mandatory
417 - N/A
420 * - 55
421 - The initializer for an aggregate or union shall be enclosed in braces
422 …- `Rule 9.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_09_02.c>…
423 - Required
424 - N/A
427 * - 56
428 - Arrays shall not be partially initialized
429 …- `Rule 9.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_09_03.c>…
430 - Required
431 - N/A
434 * - 57
435 - An element of an object shall not be initialized more than once
436 …- `Rule 9.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_09_04.c>…
437 - Required
438 - N/A
441 * - 58
442 …- Where designated initializers are used to initialize an array object the size of the array shal…
443 …- `Rule 9.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_09_05.c>…
444 - Required
445 - N/A
448 * - 59
449 - Operands shall not be of an inappropriate essential type
450 …- `Rule 10.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_01.c…
451 - Required
452 …- `STR04-C <https://wiki.sei.cmu.edu/confluence/display/c/STR04-C.+Use+plain+char+for+characters+…
455 * - 60
456 …- Expressions of essentially character type shall not be used inappropriately in addition and sub…
457 …- `Rule 10.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_02.c…
458 - Required
459 …- `STR04-C <https://wiki.sei.cmu.edu/confluence/display/c/STR04-C.+Use+plain+char+for+characters+…
462 * - 61
463 …- The value of an expression shall not be assigned to an object with a narrower essential type or…
464 …- `Rule 10.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_03.c…
465 - Required
466 …- `STR04-C <https://wiki.sei.cmu.edu/confluence/display/c/STR04-C.+Use+plain+char+for+characters+…
469 * - 62
470 …- Both operands of an operator in which the usual arithmetic conversions are performed shall have…
471 …- `Rule 10.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_04.c…
472 - Required
473 …- `STR04-C <https://wiki.sei.cmu.edu/confluence/display/c/STR04-C.+Use+plain+char+for+characters+…
476 * - 63
477 - The value of an expression should not be cast to an inappropriate essential type
478 …- `Rule 10.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_05.c…
479 - Advisory
480 - N/A
483 * - 64
484 …- The value of a composite expression shall not be assigned to an object with wider essential type
485 …- `Rule 10.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_06.c…
486 - Required
487 …- `INT02-C <https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+…
490 * - 65
491 …- If a composite expression is used as one operand of an operator in which the usual arithmetic c…
492 …- `Rule 10.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_07.c…
493 - Required
494 …- `INT02-C <https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+…
497 * - 66
498 …- The value of a composite expression shall not be cast to a different essential type category or…
499 …- `Rule 10.8 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_10_08.c…
500 - Required
501 …- `INT02-C <https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+…
504 * - 67
505 … - Conversions shall not be performed between a pointer to an incomplete type and any other type
506 …- `Rule 11.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_11_02.c…
507 - Required
508 - N/A
511 * - 68
512 - A cast shall not be performed between pointer to void and an arithmetic type
513 …- `Rule 11.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_11_06.c…
514 - Required
515 - N/A
518 * - 69
519 - A cast shall not be performed between pointer to object and a noninteger arithmetic type
520 …- `Rule 11.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_11_07.c…
521 - Required
522 - N/A
525 * - 70
526 …- A cast shall not remove any const or volatile qualification from the type pointed to by a point…
527 …- `Rule 11.8 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_11_08.c…
528 - Required
529 …- `EXP05-C <https://wiki.sei.cmu.edu/confluence/display/c/EXP05-C.+Do+not+cast+away+a+const+quali…
532 * - 71
533 - The macro NULL shall be the only permitted form of integer null pointer constant
534 …- `Rule 11.9 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_11_09.c…
535 - Required
536 - N/A
539 * - 72
540 - The precedence of operators within expressions should be made explicit
541 …- `Rule 12.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_12_01.c…
542 - Advisory
543 …- `EXP00-C <https://wiki.sei.cmu.edu/confluence/display/c/EXP00-C.+Use+parentheses+for+precedence…
546 * - 73
547 …- The right hand operand of a shift operator shall lie in the range zero to one less than the wid…
548 …- `Rule 12.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_12_02.c…
549 - Required
550 - N/A
553 * - 74
554 - Evaluation of constant expressions should not lead to unsigned integer wrap-around
555 …- `Rule 12.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_12_04.c…
556 - Advisory
557 - N/A
560 * - 75
561 …- The sizeof operator shall not have an operand which is a function parameter declared as “array …
562 …- `Rule 12.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_12_05.c…
563 - Mandatory
564 - N/A
567 * - 76
568 - Initializer lists shall not contain persistent side effects
569 …- | `Rule 13.1 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/mast…
570 …| `Rule 13.1 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/…
571 - Required
572 - N/A
575 * - 77
576 …- The value of an expression and its persistent side effects shall be the same under all permitte…
577 …- `Rule 13.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_02.c…
578 - Required
579 - N/A
582 * - 78
583 …- A full expression containing an increment (++) or decrement (--) operator should have no other …
584 …- `Rule 13.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_03.c…
585 - Advisory
586 - N/A
589 * - 79
590 - The result of an assignment operator should not be used
591 …- `Rule 13.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_04.c…
592 - Advisory
593 - N/A
596 * - 80
597 … - The right hand operand of a logical && or || operator shall not contain persistent side effects
598 …- | `Rule 13.5 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/mast…
599 …| `Rule 13.5 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/…
600 - Required
601 …- `EXP10-C <https://wiki.sei.cmu.edu/confluence/display/c/EXP10-C.+Do+not+depend+on+the+order+of+…
604 * - 81
605 …- The operand of the sizeof operator shall not contain any expression which has potential side ef…
606 …- `Rule 13.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_13_06.c…
607 - Mandatory
608 - N/A
611 * - 82
612 - A loop counter shall not have essentially floating type
613 …- `Rule 14.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_01.c…
614 - Required
615 - N/A
618 * - 83
619 - A for loop shall be well-formed
620 …- `Rule 14.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_02.c…
621 - Required
622 - N/A
625 * - 84
626 - Controlling expressions shall not be invariant
627 …- `Rule 14.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_03.c…
628 - Required
629 - N/A
632 * - 85
633 …- The controlling expression of an if statement and the controlling expression of an iteration-st…
634 …- `Rule 14.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_04.c…
635 - Required
636 - N/A
639 * - 86
640 - The goto statement shall jump to a label declared later in the same function
641 …- `Rule 15.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_15_02.c…
642 - Required
643 - N/A
646 * - 87
647 …- Any label referenced by a goto statement shall be declared in the same block, or in any block e…
648 …- `Rule 15.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_15_03.c…
649 - Required
650 - N/A
653 * - 88
654 - The body of an iteration-statement or a selection-statement shall be a compound-statement
655 …- `Rule 15.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_15_06.c…
656 - Required
657 …- `EXP19-C <https://wiki.sei.cmu.edu/confluence/display/c/EXP19-C.+Use+braces+for+the+body+of+an+…
660 * - 89
661 - All if else if constructs shall be terminated with an else statement
662 …- `Rule 15.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_15_07.c…
663 - Required
664 - N/A
667 * - 90
668 - All switch statements shall be well-formed
669 …- `Rule 16.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_01.c…
670 - Required
671 - N/A
674 * - 91
675 …- A switch label shall only be used when the most closely-enclosing compound statement is the bod…
676 …- `Rule 16.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_02.c…
677 - Required
678 …- `MSC20-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC20-C.+Do+not+use+a+switch+statement+…
681 * - 92
682 - An unconditional break statement shall terminate every switch-clause
683 …- `Rule 16.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_03.c…
684 - Required
685 - N/A
688 * - 93
689 - Every switch statement shall have a default label
690 …- `Rule 16.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_04.c…
691 - Required
692 - N/A
695 * - 94
696 … - A default label shall appear as either the first or the last switch label of a switch statement
697 …- `Rule 16.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_05.c…
698 - Required
699 - N/A
702 * - 95
703 - Every switch statement shall have at least two switch-clauses
704 …- `Rule 16.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_06.c…
705 - Required
706 - N/A
709 * - 96
710 - A switch-expression shall not have essentially Boolean type
711 …- `Rule 16.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_16_07.c…
712 - Required
713 - N/A
716 * - 97
717 - The features of <stdarg.h> shall not be used
718 …- `Rule 17.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_17_01.c…
719 - Required
720 …- `ERR00-C <https://wiki.sei.cmu.edu/confluence/display/c/ERR00-C.+Adopt+and+implement+a+consiste…
723 * - 98
724 - Functions shall not call themselves, either directly or indirectly
725 …- `Rule 17.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_17_02.c…
726 - Required
727 …- `MEM05-C <https://wiki.sei.cmu.edu/confluence/display/c/MEM05-C.+Avoid+large+stack+allocations>…
730 * - 99
731 - A function shall not be declared implicitly
732 …- `Rule 17.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_17_03.c…
733 - Mandatory
734 - N/A
737 * - 100
738 …- All exit paths from a function with non-void return type shall have an explicit return statemen…
739 …- `Rule 17.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_17_04.c…
740 - Mandatory
741 - N/A
744 * - 101
745 …- The function argument corresponding to a parameter declared to have an array type shall have an…
746 …- `Rule 17.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_17_05.c…
747 - Advisory
748 - N/A
751 * - 102
752 - The declaration of an array parameter shall not contain the static keyword between the [ ]
753 …- `Rule 17.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_17_06.c…
754 - Mandatory
755 - N/A
758 * - 103
759 - The value returned by a function having non-void return type shall be used
760 …- `Rule 17.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_17_07.c…
761 - Required
762 - N/A
765 * - 104
766 …- A pointer resulting from arithmetic on a pointer operand shall address an element of the same a…
767 …- `Rule 18.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_18_01.c…
768 - Required
769 …- `EXP08-C <https://wiki.sei.cmu.edu/confluence/display/c/EXP08-C.+Ensure+pointer+arithmetic+is+u…
772 * - 105
773 …- Subtraction between pointers shall only be applied to pointers that address elements of the sam…
774 …- `Rule 18.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_18_02.c…
775 - Required
776 …- `EXP08-C <https://wiki.sei.cmu.edu/confluence/display/c/EXP08-C.+Ensure+pointer+arithmetic+is+u…
779 * - 106
780 …- The relational operators >, >=, < and <= shall not be applied to objects of pointer type except…
781 …- `Rule 18.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_18_03.c…
782 - Required
783 …- `EXP08-C <https://wiki.sei.cmu.edu/confluence/display/c/EXP08-C.+Ensure+pointer+arithmetic+is+u…
786 * - 107
787 - Declarations should contain no more than two levels of pointer nesting
788 …- `Rule 18.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_18_05.c…
789 - Advisory
790 - N/A
793 * - 108
794 …- The address of an object with automatic storage shall not be copied to another object that pers…
795 …- | `Rule 18.6 example 1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/mast…
796 …| `Rule 18.6 example 2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/…
797 - Required
798 - N/A
801 * - 109
802 - Variable-length array types shall not be used
803 …- `Rule 18.8 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_18_08.c…
804 - Required
805 - N/A
808 * - 110
809 - An object shall not be assigned or copied to an overlapping object
810 …- `Rule 19.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_19_01.c…
811 - Mandatory
812 - N/A
815 * - 111
816 …- The ', or \ characters and the /* or // character sequences shall not occur in a header file na…
817 …- `Rule 20.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_02.c…
818 - Required
819 - N/A
822 * - 112
823 - The #include directive shall be followed by either a <filename> or "filename" sequence
824 …- `Rule 20.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_03.c…
825 - Required
826 - N/A
829 * - 113
830 - A macro shall not be defined with the same name as a keyword
831 …- `Rule 20.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_04.c…
832 - Required
833 - N/A
836 * - 114
837 … - Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses
838 …- `Rule 20.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_07.c…
839 - Required
840 …- `PRE01-C <https://wiki.sei.cmu.edu/confluence/display/c/PRE01-C.+Use+parentheses+within+macros+…
843 * - 115
844 … - The controlling expression of a #if or #elif preprocessing directive shall evaluate to 0 or 1
845 …- `Rule 20.8 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_08.c…
846 - Required
847 - N/A
850 * - 116
851 …- All identifiers used in the controlling expression of #if or #elif preprocessing directives sha…
852 …- `Rule 20.9 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_09.c…
853 - Required
854 - N/A
857 * - 117
858 …- A macro parameter immediately following a # operator shall not immediately be followed by a ## …
859 …- `Rule 20.11 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_11.…
860 - Required
861 - N/A
864 * - 118
865 …- A macro parameter used as an operand to the # or ## operators, which is itself subject to furth…
866 …- `Rule 20.12 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_12.…
867 - Required
868 - N/A
871 * - 119
872 - A line whose first token is # shall be a valid preprocessing directive
873 …- `Rule 20.13 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_13.…
874 - Required
875 - N/A
878 * - 120
879 …- All #else, #elif and #endif preprocessor directives shall reside in the same file as the #if, #…
880 …- `Rule 20.14 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_14.…
881 - Required
882 - N/A
885 * - 121
886 - #define and #undef shall not be used on a reserved identifier or reserved macro name
887 …- `Rule 21.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_01.c…
888 - Required
889 - N/A
892 * - 122
893 - A reserved identifier or macro name shall not be declared
894 …- `Rule 21.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_02.c…
895 - Required
896 - N/A
899 * - 123
900 - The memory allocation and deallocation functions of <stdlib.h> shall not be used
901 …- `Rule 21.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_03.c…
902 - Required
903 …- `MSC24-C <https://wiki.sei.cmu.edu/confluence/display/c/MSC24-C.+Do+not+use+deprecated+or+obsol…
906 * - 124
907 - The standard header file <setjmp.h> shall not be used
908 …- `Rule 21.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_04.c…
909 - Required
910 - N/A
913 * - 125
914 - The Standard Library input/output functions shall not be used
915 …- `Rule 21.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_06.c…
916 - Required
917 - N/A
920 * - 126
921 - The atof, atoi, atol and atoll functions of <stdlib.h> shall not be used
922 …- `Rule 21.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_07.c…
923 - Required
924 - N/A
927 * - 127
928 - The library functions bsearch and qsort of <stdlib.h> shall not be used
929 …- `Rule 21.9 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_09.c…
930 - Required
931 - N/A
934 * - 128
935 - The standard header file <tgmath.h> shall not be used
936 …- `Rule 21.11 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_11.…
937 - Required
938 - N/A
941 * - 129
942 - The exception handling features of <fenv.h> should not be used
943 …- `Rule 21.12 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_12.…
944 - Advisory
945 - N/A
948 * - 130
949 …- Any value passed to a function in <ctype.h> shall be representable as an unsigned char or be th…
950 …- `Rule 21.13 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_13.…
951 - Mandatory
952 - N/A
955 * - 131
956 - The Standard Library function memcmp shall not be used to compare null terminated strings
957 …- `Rule 21.14 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_14.…
958 - Required
959 - N/A
962 * - 132
963 …- The pointer arguments to the Standard Library functions memcpy, memmove and memcmp shall be poi…
964 …- `Rule 21.15 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_15.…
965 - Required
966 - N/A
969 * - 133
970 …- The pointer arguments to the Standard Library function memcmp shall point to either a pointer t…
971 …- `Rule 21.16 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_16.…
972 - Required
973 - N/A
976 * - 134
977 …- Use of the string handling functions from <string.h> shall not result in accesses beyond the bo…
978 …- `Rule 21.17 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_17.…
979 - Mandatory
980 - N/A
983 * - 135
984 - The size_t argument passed to any function in <string.h> shall have an appropriate value
985 …- `Rule 21.18 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_18.…
986 - Mandatory
987 - N/A
990 * - 136
991 …- The pointers returned by the Standard Library functions localeconv, getenv, setlocale or, strer…
992 …- `Rule 21.19 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_19.…
993 - Mandatory
994 - N/A
997 * - 137
998 …- The pointer returned by the Standard Library functions asctime, ctime, gmtime, localtime, local…
999 …- `Rule 21.20 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_20.…
1000 - Mandatory
1001 - N/A
1004 * - 138
1005 …- All resources obtained dynamically by means of Standard Library functions shall be explicitly r…
1006 …- `Rule 22.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_01.c…
1007 - Required
1008 - N/A
1011 * - 139
1012 …- A block of memory shall only be freed if it was allocated by means of a Standard Library functi…
1013 …- `Rule 22.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_02.c…
1014 - Mandatory
1015 - N/A
1018 * - 140
1019 … - The same file shall not be open for read and write access at the same time on different streams
1020 …- `Rule 22.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_03.c…
1021 - Required
1022 - N/A
1025 * - 141
1026 - There shall be no attempt to write to a stream which has been opened as read-only
1027 …- `Rule 22.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_04.c…
1028 - Mandatory
1029 - N/A
1032 * - 142
1033 - A pointer to a FILE object shall not be dereferenced
1034 …- `Rule 22.5 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_05.c…
1035 - Mandatory
1036 - N/A
1039 * - 143
1040 … - The value of a pointer to a FILE shall not be used after the associated stream has been closed
1041 …- `Rule 22.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_06.c…
1042 - Mandatory
1043 - N/A
1046 * - 144
1047 …- The macro EOF shall only be compared with the unmodified return value from any Standard Library…
1048 …- `Rule 22.7 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_07.c…
1049 - Required
1050 - N/A
1053 * - 145
1054 - The value of errno shall be set to zero prior to a call to an errno-setting-function
1055 …- `Rule 22.8 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_08.c…
1056 - Required
1057 - N/A
1060 * - 146
1061 - The value of errno shall be tested against zero after calling an errno-setting-function
1062 …- `Rule 22.9 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_09.c…
1063 - Required
1064 - N/A
1067 * - 147
1068 …- The value of errno shall only be tested when the last function to be called was an errno-settin…
1069 …- `Rule 22.10 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_10.…
1070 - Required
1071 - N/A
1088 Excluding declarations from the header based on compile-time options may prevent
1107 implementations of industry standard specifications governed externally to the
1110 Existing usage is recommended to change as soon as updated industry standard
1114 .. list-table::
1115 :header-rows: 1
1117 * - Offensive Terms
1118 - Recommended Replacements
1120 * - ``{master,leader} / slave``
1121 - - ``{primary,main} / {secondary,replica}``
1122 - ``{initiator,requester} / {target,responder}``
1123 - ``{controller,host} / {device,worker,proxy,target}``
1124 - ``director / performer``
1125 - ``central / peripheral``
1127 * - ``blacklist / whitelist``
1128 - * ``denylist / allowlist``
1132 * - ``grandfather policy``
1133 - * ``legacy``
1135 * - ``sanity``
1136 - * ``coherence``
1144 .. _Code of Conduct: https://github.com/zephyrproject-rtos/zephyr/blob/main/CODE_OF_CONDUCT.md
1150 .. list-table::
1151 :header-rows: 1
1153 * - Area
1154 - Selected Replacements
1155 - Status
1157 * - :ref:`Bluetooth <bluetooth_api>`
1158 - See `Bluetooth Appropriate Language Mapping Tables`_
1159 -
1161 * - CAN
1162 - This `CAN in Automation Inclusive Language news post`_ has a list of general
1165 -
1167 * - eSPI
1168 - * ``master / slave`` => ``controller / target``
1169 - Refer to `eSPI Specification`_ for new terminology
1171 * - gPTP
1172 - * ``master / slave`` => TBD
1173 -
1175 * - :ref:`i2c_api`
1176 - * ``master / slave`` => TBD
1177 - NXP publishes the `I2C Specification`_ and has selected ``controller /
1185 * - :ref:`i2s_api`
1186 - * ``master / slave`` => TBD
1187 -
1189 * - SMP/AMP
1190 - * ``master / slave`` => TBD
1191 -
1193 * - :ref:`spi_api`
1194 - * ``master / slave`` => ``controller / peripheral``
1196 - The Open Source Hardware Association has selected these replacement
1199 * - :ref:`twister_script`
1200 - * ``platform_whitelist`` => ``platform_allow``
1202 -
1204 ….. _Inclusive Language Label: https://github.com/zephyrproject-rtos/zephyr/issues?q=label%3A%22Inc…
1205 .. _I2C Specification: https://www.nxp.com/docs/en/user-guide/UM10204.pdf
1206 …te Language Mapping Tables: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_L…
1207 …ution to Redefine SPI Signal Names: https://www.oshwa.org/a-resolution-to-redefine-spi-signal-name…
1208 ….. _CAN in Automation Inclusive Language news post: https://www.can-cia.org/news/archive/view/?tx_…
1209 .. _CAN in Automation Inclusive Language: https://can-newsletter.org/canopen/categories/
1210 …I Specification: https://downloadmirror.intel.com/27055/327432%20espi_base_specification%20R1-5.pdf
1223 prefixed to place them in a Zephyr-specific namespace, re-defined using ``#undef``, or
1229 …macro or its current name in the tree. If a macro name is commonly used in several other well-known
1231 …subjective and non-measurable component to what "commonly used" means, the ultimate goal is to off…
1234 …Finally, this rule applies to inter-module name collisions as well: in that case both modules, pri…
1235 to their inclusion, should be modified to use module-specific versions of the macro name that
1242 considered the central or main project, it should implement the non-namespaced versions of the
1246 Rule A.4: C Standard Library Usage Restrictions in Zephyr Kernel
1252 The use of the C standard library functions and macros in the Zephyr kernel
1254 9899:2011 standard, also known as C11, and their extensions:
1256 .. csv-table:: List of allowed libc functions and macros in the Zephyr kernel
1314 `strnlen()`_,POSIX.1-2008
1335 ISO/IEC 9899:2011 standard must be implemented by the
1337 multiple C standard libraries.
1339 Introducing new C standard library functions to the Zephyr kernel is allowed
1355 :ref:`minimal libc <c_library_minimal>`, a limited C standard library
1357 Project, to allow self-contained testing and verification of the kernel and
1361 is necessary to restrict the use of the C standard library functions and macros
1365 Rule A.5: C Standard Library Usage Restrictions in Zephyr Codebase
1371 The use of the C standard library functions and macros in the Zephyr codebase
1372 shall be limited to the functions, excluding the Annex K "Bounds-checking
1373 interfaces", from the ISO/IEC 9899:2011 standard, also known as C11, unless
1383 The following non-ISO 9899:2011, hereinafter referred to as non-standard,
1387 .. csv-table:: List of allowed non-standard libc functions
1391 `gmtime_r()`_,POSIX.1-2001
1392 `strnlen()`_,POSIX.1-2008
1393 `strtok_r()`_,POSIX.1-2001
1395 All non-standard functions and macros listed above must be implemented by the
1397 functions can be made available when using a C standard library that does not
1400 Adding a new non-standard function from common C standard libraries to the
1402 satisfied. However, when there exists a standard function that is functionally
1403 equivalent, the standard function shall be used.
1406 Some C standard libraries, such as Newlib and Picolibc, include additional
1407 functions and macros that are defined by the standards and de-facto standards
1408 that extend the ISO C standard (e.g. POSIX, Linux).
1410 The ISO/IEC 9899:2011 standard does not require C compiler toolchains to
1411 include the support for these non-standard functions, and therefore using
1412 these functions can lead to compatibility issues with the third-party
1413 toolchains that come with their own C standard libraries.
1415 .. _main Zephyr repository: https://github.com/zephyrproject-rtos/zephyr