[Bug c/115513] attribute nonstring could help with printf mistakes
xry111 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 17 11:07:28 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115513
--- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Peter Eisentraut from comment #2)
> (In reply to Xi Ruoyao from comment #1)
> > But what should we do with something like `printf("%32s", pd->name);`?
>
> Perhaps you mean
>
> printf("%.32s", pd->name);
Yes I mean "%.32s".
More information about the Gcc-bugs
mailing list