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

            Bug ID: 95190
           Summary: Documentation for -Wstringop-overflow
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stayprivate at gmail dot com
  Target Milestone: ---

I'm compiling code with 10.1 for the first time. I'm getting a warning:

"writing 1 bytes into a region of size 0 -Wstringop-overflow=". Yet
-Wno-stringop-overflow is passed to the compiler.  I tried disabling the
warning with #pragma diagnostic, no luck there.

Then I realized the error came from the link stage. Surely related to lto. I
modified my cmake files to add the -Wno-stringop-overflow to the link command
line and the warning disappear.

I'm surprise by this behavior. I looked through the documentation and could not
find anything that mentionned this. Is this something that is worth improving
in  the documentation or do I just need to get smarter ;-)

Reply via email to