[Bug c/115513] attribute nonstring could help with printf mistakes

2024-06-17 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115513 --- Comment #3 from Xi Ruoyao --- (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",

[Bug c/115513] attribute nonstring could help with printf mistakes

2024-06-17 Thread peter at eisentraut dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115513 --- Comment #2 from Peter Eisentraut --- (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); ? (I don't think the minimum field widt

[Bug c/115513] attribute nonstring could help with printf mistakes

2024-06-16 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115513 Xi Ruoyao changed: What|Removed |Added Last reconfirmed||2024-06-17 Severity|normal