Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wstringop-overread-1.C
blob: f7ba61783da94b993371cedc29f702821efa08b3 [
file
] [
log
] [
blame
]
// PR middle-end/98994
// { dg-do compile }
// { dg-additional-options "-Wstringop-overread -O2" }
#include
<string>
const
char
constantString
[]
=
{
42
,
53
};
void
f
(
std
::
string
&
s
)
{
s
.
insert
(
0
,
static_cast
<
const
char
*>(
constantString
),
2
);
}