News for hackers. Stuff that matters.
Re:Misra C++:2023 Published by hgs3 on Sunday December 17, 2023 @07:10PM (#38677766)
In addition to avoiding undefined behavior, MISRA discourages language features that are "dangerous" like I/O and dynamic memory routines. It also defines some (controversial) styling rules, such as requiring functions to have exactly one exit point.
Re:Misra C++:2023 Published by cordenr on Monday December 18, 2023 @04:17AM (#38680587)
SE/SE is called out explicitly in the ISO26262 documents (functional safety in road vehicles). This makes it easy to defend the inclusion of such a guideline, even if you may not agree with it.

But as it happens, MISRA C++:2023 doesn't have this guideline.

Re:Misra C++:2023 Published by bfrog on Monday December 18, 2023 @09:28PM (#38691075)
no_std rust then which has no i/o or heap, and what misra rules would there even need to be?
Re:Misra C++:2023 Published by hgs3 on Tuesday December 19, 2023 @02:13PM (#38700105)
Code styling rules, such as requiring functions to have exactly one exit point, could be carried over to Rust. Many existing rules are still relevant for unsafe blocks and there would likely be new rules for panic.
Re:Misra C++:2023 Published by bfrog on Tuesday December 19, 2023 @09:03PM (#38704631)
I believe the single exit rule was dropped