back

by uecker·2y ago·view on hn ↗
Not my proposal, but what exactly do you dislike about it?

cleanup is unlikely to be standardized exactly as implemented as it would violate the rule that standard attributes can be removed from a correct program.

1 comments
That it would require rewriting everything that is already using attribute((cleanup)), which is a lot of code these days. Just make-work for no benefit.

> it would violate the rule

Good, let's change that rule for this case.

While I agree that there is some value in putting an existing extension into the standard as is, not doing so would not mean that everybody has to rewrite their code. Code that already uses a non-standard attribute could simply continue to do so. I would just not automatically become standard compliant.

I think changing the rule would create a mess, so I am not in favor of this. I wonder if there is a way so that existing macro wrappers could be adapted...