# NASA C 10 coding rules plyr0 2026-06-09 The Power of Ten – Rules for Developing Safety Critical Code Gerard J. Holzmann => http://web.eecs.umich.edu/~imarkov/10rules.pdf Nasa’s 10 coding rules for safety-critical code - Aikido => https://www.aikido.dev/code-quality/rules/nasa-10-coding-rules-for-safety-critical-code 1. no goto, no setjmp/longjmp, no recursion, maybe goto on an early error, no direct nor non-direct recursion 2. loop fixed upper boundary, for(; i < j && i <= FIXED_MAX; ++i) error handling on i == FIXED_MAX, FIXED_MAX set on compile time 3. no malloc, no heap, stack only 4. function max length is 60 lines of code, fits on one print page 5. defensive assertions everywhere, bool, no side effects, recovery 6. data minimal scope, limit globals, but don't reuse variables 7. function's return value must not be ignored, test for errors always validate function's arguments 8. limit preprocessor only to the #include and very simple macros no ##, no __VA_ARGS__, no recursive macros 9. no **pointers to pointers, no pointers to *functions no pointers in macros, no pointers in typedef 10.-Wall -Wextra -Wpedantic since the day one, but not -Weverything always use static code analyzers, allow no warnings ever => https://airbus-seclab.github.io/c-compiler-security/clang_compilation.html#warnings