☰
Debian Codegraph
@
1:22.1.8-2
1:22.1.8-1
1:22.1.7-1
/
/
clang
/
test
/
SemaCXX
/
non-empty-class-size-zero.cpp
☽
☼
clang/test/SemaCXX/non-empty-class-size-zero.cpp
code
plain
raw
APACHE-2-LLVM-EXCEPTIONS
2003-2017 University of Illinois at Urbana-Champaign.
debian/copyright
1
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s
2
3
struct X {
4
int array[0];
5
int array1[0];
6
int array2[0];
7
X();
8
~X();
9
};
10
11
struct Y {
12
int first;
13
X padding;
14
int second;
15
};
16
17
int zero_size_array[(sizeof(Y) == 8) -1]; // no error here!