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