↧
Answer by Davislor for Consolidating GNU C's and C23's attributes
For any attribute that has either a standard version or a GCC/Clang extension, the separate #if clauses need to be #if/#elif blocks, This lets the header work either on any C23 compiler that supports...
View ArticleConsolidating GNU C's and C23's attributes
C23 has introduced attribute specifier sequences. Consequently, the header below attempts to conditionally define macros for these sequences (for my own use cases). In cases where a compiler does not...
View ArticleAnswer by Toby Speight for Consolidating GNU C's and C23's attributes
This test is clearly over-doing it:#if defined(__STDC__) && defined(__STDC_VERSION__) && \ (__STDC_VERSION__ >= 202000L) \ #include <stddef.h> /* nullptr_t */There's no need to...
View Article