Re:A Defer Mechanism for C
by dataflow on Monday December 14, 2020 @10:16AM
(#25418459)
This is... wild. I had no idea attrribute((cleanup)) was a thing in CNU C. Did the C folks finally discover the concept of a destructor? What's the point of resisting C++ so adamantly if they're going to introduce the same features with an awful nonstandard syntax in an ad-hoc manner anyway?
[ Parent
| on HN ]
The attribute(cleanup) is just exposing to C the C++ destructor functionality that is already implemented in the compiler. That's why it's using the awkward nonstandard syntax.