https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86936
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic, | |missed-optimization --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Besides missing out on an optimization opportunity the transformation also prevents diagnosing strlen() calls with such arguments where the second argument is greater than the upper bound of the array. (Issuing the diagnostic regardless would result in false positives if the referenced element was, in fact, nul-terminated, as would be the case if a were defined like so: const char a[][4] = { "12", "123", "1234" };)