bolt/deps/llvm-18.1.8/clang/test/SemaCXX/non-empty-class-size-zero.cpp

18 lines
267 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s
struct X {
int array[0];
int array1[0];
int array2[0];
X();
~X();
};
struct Y {
int first;
X padding;
int second;
};
int zero_size_array[(sizeof(Y) == 8) -1]; // no error here!