by retrogradeorbit · 11y ago · 0 comments
From earlier this year, NASA's 10 rules for safety critical systems [1]:
Rule 1: Restrict all code to very simple control flow constructs.
Do not use GOTO statements, setjmp or longjmp constructs, or
direct or indirect recursion.
I don't think gotos are inherently bad, but I choose to heed the advice of people with more experience than me. (I do think that hiding gotos in macros is inherently bad, though.)[1] http://sdtimes.com/nasas-10-rules-developing-safety-critical...
Also note that systemd employs gcc's __attribute__((cleanup(...))) logic to improve code clarity.