[Bug tree-optimization/124183] Erroneous -Wformat-truncation= warning using -O3

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 20 15:40:16 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124183

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Adding:

  if (!cstr) {
    return 1;
  }

After the malloc does fix the warning.


More information about the Gcc-bugs mailing list