[Bug c/87192] New: -Warray-bounds (even =2) does not work on struct members
bugdal at aerifal dot cx
gcc-bugzilla@gcc.gnu.org
Sun Sep 2 22:10:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87192
Bug ID: 87192
Summary: -Warray-bounds (even =2) does not work on struct
members
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: bugdal at aerifal dot cx
Target Milestone: ---
Minimal test case:
void bar(void *);
void foo()
{
struct {
int a[10];
} s;
bar(s.a+12);
}
Compiles without warning with -O2 -Warray-bounds=2. Tested on gcc 7.3.
More information about the Gcc-bugs
mailing list