repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
object-size-1.C
blob
d2881d69a20b4387b3e3d44823942fc06940bec2
1
// { dg-do compile }
2
// { dg-options "-Wpedantic -Wno-error=pedantic -fsanitize=undefined -fpermissive" }
3
4
struct T
5
{
6
int c; char d[]; // { dg-warning "forbids flexible array member" }
7
};
8
9
struct T t = { 1, "a" }; // { dg-warning "initialization of a flexible array member " }
10
11
int
12
baz (int i)
13
{
14
return t.d[i];
15
}
16
17
int
18
main (void)
19
{
20
baz (3);
21
}