4 ms·
“this feature cannot be easily lifted into C23 as a standard attribute, because the cleanup feature clearly changes the semantics of a program and can thus not
by kps 5y ago
“this feature cannot be easily lifted into C23 as a standard attribute, because the cleanup feature clearly changes the semantics of a program and can thus not be ignored.”
- nmilo 5y agoThen it doesn't need to use the existing attribute syntax, which requires that attributes can be ignored. They can make a new syntax.
- rwmj 5y agoThat's a very weak objection. In any case since most programs are hiding __attribute__((cleanup)) in a macro (eg. glib's g_autoptr macro or systemd's family of _cleanup_* macros) you could use another kind of annotation. The point here is that the C working group should be standardizing existing practice and helping the existing users of C, and not striking out making bizarre new syntax choices and keywords which are completely unproven.
- jibalt 5y agoSo don't lift it as a standard attribute.