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

--- Comment #4 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
OK, so the work (for this warning or a new one) should be done later, but early
enough not to be affected by optimizations.

One of the goals would be to detect a missing check of a return value of a
function call (typically an error status). For such a typical usage, the same
variable can be reused for each error status.

  int r;

  r = call1 (...);
  check (r);
  /* ... */
  r = call2 (...);
  check (r);
  /* ... */
  r = call3 (...);
  check (r);

If a check is missing, there should be a warning.

Reply via email to