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

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
The sprintf pass doesn't do any optimization at -O0 but it still runs to
diagnose the subset of mistakes that are detectable even without optimization. 
For instance, the buffer overflow due to the off-by-one error in the following
is diagnosed at -O0:

  char a[8];

  void f (void)
  {
    sprintf (a, "%s/%s", "dir", "file");
  }

Reply via email to