Yes, doubly curly braces are no longer necessary. The following works as expected wirh #gcc 12, 14, and #clang 19. Pet has no previous clang at paw, it was too buggy.
Enough #meow, here's the test:
#include <stdio.h>
void cleanup(char*)
{
puts("cleanup\n");
}
int main(int argc, char** argv)
{
for (unsigned i = 0; i < 5; i++) {
[[ gnu::cleanup(cleanup) ]] char c = 0;
printf("iteration %u\n", i);
}
return 0;
}



