https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771
qinzhao at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qinzhao at gcc dot gnu.org --- Comment #27 from qinzhao at gcc dot gnu.org --- (In reply to Jeffrey A. Law from comment #21) > Sorry, but when I look at this, the warning seems correct and valid to me. > ... > > Which is exactly what we want and highlights the error in the original user > code. Namely that when f+1 is zero we'll make a totally bogus call to > strncpy. > > Suppressing warnings per Jakub's comment in c#10 would just hide the fact > that the user's code is just plain broken. If you find yourself blaming > threading for exposing a warning like this, you're barking up the wrong tree > Jakub. Threading is just exposing what's already broken in the user's > original code and we absolutely do want these warnings. Yes, I agree with Jeff. This looks like a similar issue as PR109071.