repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
desig4.C
blob
4180e0983eaafe7df1e751b3e6fa1b212c22d1a1
1
// PR c++/82593
2
// { dg-do compile { target c++11 } }
3
// { dg-options "" }
4
5
int INDEX1 = 0;
6
int INDEX2 = 1;
7
8
class SomeClass {
9
public:
10
SomeClass();
11
private:
12
struct { int field; } member[2];
13
};
14
15
SomeClass::SomeClass()
16
: member{
17
[INDEX1] = { .field = 0 }, // { dg-error "constant expression" }
18
[INDEX2] = { .field = 1 } // { dg-error "constant expression" }
19
}
20
{
21
}