Preprocessing C code to only use C23 attribute notation

62 Views Asked by At

Is there a way for GCC/Clang/a C pretty-printer tool to preprocess/pretty-print a source file, using only the "new" (C23) attribute notation? In other words, transform this code:

int a __attribute__((foo));

Into this?

int a[[foo]];

This would help for instance code analysis tools to avoid having to deal with both notations; code using non-standard GNU attribute notation could automatically become C23-compatible.

0

There are 0 best solutions below