| ▲ | cassepipe 4 hours ago | |
It is surprisingly hard to find information about it, do you have any ? From what I can guess it's a new syntax but it's the feature itself is still an extension ? | ||
| ▲ | ksherlock 3 hours ago | parent | next [-] | |
[[ ]] attributes were added in C++11 and later C23. There are 7 standard(C32) attributes but GCC has hundreds of them. https://en.cppreference.com/w/c/language/attributes.html https://en.cppreference.com/w/cpp/language/attributes.html https://gcc.gnu.org/onlinedocs/gcc/Attributes.html https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attribute... | ||
| ▲ | SAI_Peregrinus 3 hours ago | parent | prev | next [-] | |
The `[[attribute]]` syntax is new, the builtin ones in C23 are `[[deprecated]]`, `[[fallthrough]]`, `[[maybe_unused]]`, `[[nodiscard]]`, `[[noreturn]]`, `[[reproducible]]`, and `[[unsequenced]]`. | ||
| ▲ | kccqzy 2 hours ago | parent | prev [-] | |
The feature itself is probably still __attribute__((cleanup(f))). That’s documented at https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attribute... | ||