Bug ID: 85259
           Summary: [8 Regression] Missing -Wstringop-overflow= since
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot
          Reporter: marxin at gcc dot
                CC: law at gcc dot, msebor at gcc dot
  Target Milestone: ---

Since the revision, for:

$ cat /tmp/xx11.c
#include <string.h>

char buf[6];
int main(int argc, char **argv) {
        strcpy(buf,"hello ");
        return 0;

$ gcc -O2 -Wall /tmp/xx11.c -D_FORTIFY_SOURCE=2
[no output]

Before the revision I see:
/usr/include/bits/string_fortified.h:128:10: warning: ‘__builtin___memcpy_chk’
writing 7 bytes into a region of size 6 overflows the destination

Reply via email to