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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
Wmissing-field-initializers-3.c
blob
5512d97d12f8d7a3522f3de4b4d1c737ac932296
1
/* PR c/84685 */
2
/* { dg-do compile } */
3
/* { dg-options "-Wmissing-field-initializers" } */
4
5
struct
T
6
{
7
int
a
;
8
int
*
b
;
9
int
c
;
10
int
d
;
11
int
*
e
;
12
int
f
;
13
int
g
;
14
int
h
;
15
};
16
17
struct
T
foo
(
int
bar
);
18
19
struct
T
foo
(
int
bar
)
20
{
21
struct
T t
= { .
b
= (
int
[]){
1
}, .
e
= (
int
[]){
2
} };
/* { dg-bogus "missing initializer" } */
22
t
.
c
=
bar
;
23
return
t
;
24
}