Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr79222.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* PR middle-end/79222 - missing -Wstringop-overflow= on a stpcpy overflow { dg-do compile } { dg-options "-O2" } */ extern char* stpcpy (char*, const char*); char d[3]; char* f (int i) { const char *s = i < 0 ? "01234567" : "9876543210"; return stpcpy (d, s); /* { dg-warning ".stpcpy. writing between 9 and 11 bytes into a region of size 3 overflows the destination" } */ }