logoalt Hacker News

anilakaryesterday at 8:26 AM1 replyview on HN

Various macro tricks have existed for a long time but nobody has been able to wrap the return statement yet. The lack of RAII-style automatic cleanups was one of the root causes for the legendary goto fail;[1] bug.

[1] https://gotofail.com/


Replies

ueckeryesterday at 9:14 AM

I do not see how defer would have helped in this case.

show 1 reply