[Bug tree-optimization/81163] error: ‘snprintf’ output may be truncated before the last format character [-werror=format-truncation=] note: ‘snprintf’ output between 2 and 266 bytes into a destination

2019-05-18 Thread mcroce at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81163 Matteo Croce changed: What|Removed |Added CC||mcroce at redhat dot com --- Comment #11

[Bug c++/83431] -Wformat-truncation may incorrectly report truncation

2019-05-20 Thread mcroce at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83431 --- Comment #3 from Matteo Croce --- I can reproduce it with this snippet: void f() { const char *dir = "a"; const char file[50] = "b"; char buf[4]; snprintf(buf, si