[clang] [clang][Sema] Accept gnu format attributes (PR #160255)

Xing Guo via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 23 01:29:56 PDT 2025


higuoxing wrote:

> > Seems fine, but is it documented anywhere (by GCC) that e.g. `gnu_printf` behaves the same as `printf`?
> 
> Looking at the issue you linked, they at least were equivalent in 2008 when they were added to GCC

Yes. They are still equivalent at the moment. https://gcc.gnu.org/cgit/gcc/tree/gcc/c-family/c-format.cc?h=trunk#n5268

Maybe we can add one more alias gnu_strfmon for strfmon?

https://github.com/llvm/llvm-project/pull/160255


More information about the cfe-commits mailing list