https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109851
David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|False positive va_arg when |[13/14 Regression] False |iterating through format |positive va_arg when |string with for-loop |iterating through format | |string with for-loop Last reconfirmed| |2024-02-16 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Thanks for filing this bug report. The analyzer isn't looking at the content of the string literal and assumes that any character is possible. In particular, it isn't attempting to correlate between the ordering of matches in the string and the ordering of the variadic arguments. Still affects trunk and gcc 13: Trunk: https://godbolt.org/z/bMP7sq3ea GCC 13.2: https://godbolt.org/z/e7eE8Eo4d