News for hackers. Stuff that matters.
Re:C2x: the next real revision of the C standard by gkfasdfasdf on Monday November 12, 2018 @08:33AM (#18432470)
You can do this with GCC/CLang via the cleanup attribute: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attribute...

It would be nice to have this be a part of the standard.

Re:C2x: the next real revision of the C standard by jws on Monday November 12, 2018 @09:03AM (#18432622)
It's very useful. I use it for scoping the holding of locks. It replaces the idiom where you make a separate function to hold the 'when locked' code and pass all required state back and forth with nice clean inline blocks of code.