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
simulate-thread tests: Silence gdb debuginfod warning
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
initlist123.C
blob
29f037f07efa8bc408349913d37e00120440c8ee
1
// PR c++/95164
2
// { dg-do compile { target c++11 } }
3
// { dg-options "-Wmissing-braces" }
4
5
struct H {
6
int a;
7
};
8
9
struct X : H { };
10
11
struct I {
12
int c;
13
H b;
14
};
15
struct E { I d; };
16
void foo(E);
17
18
template<int N>
19
void fn ()
20
{
21
int a = 42;
22
int &k = a;
23
24
foo({1, {H{k}}}); // { dg-warning "missing braces around initializer for .I." }
25
foo({1, {X{k}}}); // { dg-warning "missing braces around initializer for .I." }
26
27
foo({{1, {k}}});
28
foo({{1, {N}}});
29
30
foo({{1, H{k}}});
31
foo({{1, H{N}}});
32
foo({{1, X{k}}});
33
foo({{1, X{N}}});
34
35
foo({{1, {H{k}}}});
36
foo({{1, {H{N}}}});
37
foo({{1, {X{k}}}});
38
foo({{1, {X{N}}}});
39
}