Sign in
gnu
/
gcc
/
fba228e259dd5112851527f2dbb62c5601100985
/
.
/
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
;
}