Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Warray-bounds-2.C
blob: 796483e0e491551f1168b9afb762913e8d3dc9ac [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* Test that -Warray-bounds is enabled by -Wall */
/* { dg-options "-O2 -Wall" } */
int
a
[
10
];
int
*
f
(
void
)
{
a
[-
1
]
=
0
;
/* { dg-warning "array subscript" } */
return
a
;
}