4 ms·
The majority of programmers are, by definition, mediocre or worse. MISRA C specifically bans this code style.
by kurtisc 8y ago
The majority of programmers are, by definition, mediocre or worse.
MISRA C specifically bans this code style.
- Gibbon1 8y agoMISRA C also bans function pointers, goto, multiple returns and continue statements. Doesn't mandate static analysis tools either. Nuff said about that.
- gmueckl 8y agoStatic analysis tooling is outside the scope of these MISRA conventions. And yes, the language features you list are recommended against for extremely good reasons. If you know better, you can try to convince the examiners during your certification process that your coding style is superior. Good luck!
- kurtisc 8y agoMISRA C 2012 allows scoped goto. I can't see anything disallowing pointers to functions or continue. There are advisory rules against unscoped goto and multiple returns. These can be ignored with justification. Rules are described as 'decidable' if they can be found reliably with static analysis. I'd say that's outside the scope of MISRA C, though, and more of a missing feature of ISO 26262.