Hacker News new | past | comments | ask | show | jobs | submit login

https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consi...

Here's a copy of the CERT C standard. The site you linked is incorrect. If you google GOTO error handling. Or any of the sort it will come up with it. You should'nt use goto in literally any other case besides this though, which is what I( assume they were referencing.




Thanks, that's interesting.

AUTOSAR C++14 guidelines don't allow goto in any case.

MISRA C++ 2008 does have a couple of rules that allow this specific scenario.

MISRA C:2004, "goto shall not be used".

MISRA C:2012, it was weakened to "goto should not be used".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: