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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-05-31
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Felix from comment #0)
> I am compiling some software with use of GCC, there are many errors which

Those are warnings. You requested to turn them into errors with -Werror.

> are not dependent on the code being compiled, since the logs seem to point
> at the errors in the files within /usr directory:

This is an incorrect assumption.

If you write the following code, you'll get diagnostics pointing to the
standard library code, but the bug is still in your code:

  char s1[] = "abcdefghij";
  char s2[5];
  std::copy(std::begin(s1), std::end(s1), s2);

In your specific case, it might be a false positive warning. But you can't
assume that just because the diagnostics show code in the std::lib.

The build log is useless though. All it shows is there are some warnings,
nobody can tell if they're valid or not without the code. Please read
https://gcc.gnu.org/bugs again and provide the requested info. Also please
search the (many!) existing bugs about -Wstringop-overflow warnings and check
if yours is another duplicate of one of those.

Reply via email to