Home
last modified time | relevance | path

Searched refs:_Static_assert (Results 1 – 25 of 70) sorted by relevance

123

/third_party/ltp/tools/sparse/sparse-src/validation/
Dstatic_assert.c1 _Static_assert(1, "global ok");
4 _Static_assert(1, "struct ok");
9 _Static_assert(1, " func1 ok"); in bar()
12 _Static_assert(1, " func2 ok"); in bar()
15 _Static_assert(1, " func3 ok"); in bar()
19 _Static_assert(0, "expected assertion failure");
22 _Static_assert(f, "non-constant expression");
25 _Static_assert(p, "non-integer expression");
27 _Static_assert(0.1, "float expression");
29 _Static_assert(!0 == 1, "non-trivial expression");
[all …]
Denum-sign-gcc.c19 _Static_assert(sizeof(enum u) == sizeof(int), "size");
20 _Static_assert(is_unsigned(enum u), "enum u");
21 _Static_assert(is_unsigned(U) == 0, "value U"); // fail
27 _Static_assert(sizeof(enum v) == sizeof(int), "size");
28 _Static_assert(is_unsigned(enum v), "enum v");
29 _Static_assert(is_unsigned(V) == 1, "value V");
34 _Static_assert(sizeof(enum w) == sizeof(long), "size");
35 _Static_assert(is_unsigned(enum w), "enum w");
36 _Static_assert(is_unsigned(W) == 1, "value W");
42 _Static_assert(sizeof(enum x) == sizeof(long), "size");
[all …]
Dinit-wstring.c2 _Static_assert(sizeof(ok0) == 4 * sizeof(__WCHAR_TYPE__));
4 _Static_assert(sizeof(ok1) == 4 * sizeof(__WCHAR_TYPE__));
6 _Static_assert(sizeof(ok2) == 4 * sizeof(__WCHAR_TYPE__));
9 _Static_assert(sizeof(ok3) == 4 * sizeof(__WCHAR_TYPE__));
11 _Static_assert(sizeof(ok4) == 4 * sizeof(__WCHAR_TYPE__));
13 _Static_assert(sizeof(ok5) == 4 * sizeof(__WCHAR_TYPE__));
16 _Static_assert(sizeof(ok6) == 7 * sizeof(__WCHAR_TYPE__));
18 _Static_assert(sizeof(ok7) == 7 * sizeof(__WCHAR_TYPE__));
20 _Static_assert(sizeof(ok8) == 7 * sizeof(__WCHAR_TYPE__));
23 _Static_assert(sizeof(ptr) == sizeof(void *));
Denum-min-size.c2 _Static_assert(sizeof(enum i) == sizeof(int), "int");
4 _Static_assert(sizeof(enum u) == sizeof(int), "uint");
7 _Static_assert(sizeof(enum l) == sizeof(int), "long");
9 _Static_assert(sizeof(enum m) == sizeof(int), "ulong");
12 _Static_assert(sizeof(enum n) == sizeof(int), "llong");
14 _Static_assert(sizeof(enum o) == sizeof(int), "ullong");
18 _Static_assert(sizeof(enum i) == sizeof(int), "int");
21 _Static_assert(sizeof(enum l) == sizeof(int), "long");
24 _Static_assert(sizeof(enum n) == sizeof(int), "llong");
Dpacked-struct.c13 _Static_assert(__alignof(struct a) == 1, "align struct");
14 _Static_assert( sizeof(struct a) == 4, " size struct");
20 _Static_assert(__alignof(struct b) == 1, "align struct");
21 _Static_assert( sizeof(struct b) == 8, "size struct");
27 _Static_assert(__alignof(struct c) == 1, "align struct");
28 _Static_assert( sizeof(struct c) == 6, "size struct");
Darray-implicit-size.c2 _Static_assert(sizeof(array) == 4 * sizeof(int), "size of array");
10 _Static_assert(sizeof(tbl2) == 2 * sizeof(int), "size of tbl2");
15 _Static_assert(sizeof(tbl1) == 1 * sizeof(int), "size of tbl1");
22 _Static_assert(sizeof(tbl3) == 3 * sizeof(int), "size of tbl3");
Denum-bounds.c4 _Static_assert([typeof(IMAX)] == [int], "");
9 _Static_assert([typeof(IMP1)] == [unsigned int], "");
14 _Static_assert([typeof(IMM1)] == [int], "");
19 _Static_assert([typeof(IMM2)] == [long], "");
Denum-bitwise.c12 _Static_assert([typeof(RZ)] == [bits], "RZ");
13 _Static_assert([typeof(RO)] == [bits], "RO");
14 _Static_assert([typeof(RM)] == [bits], "RM");
15 _Static_assert(sizeof(enum r) == sizeof(bits), "bits");
Dpacked-bitfield3.c15 _Static_assert(__alignof(struct b) == 1);
16 _Static_assert( sizeof(struct b) == 4);
23 _Static_assert(__alignof(struct c) == 1);
24 _Static_assert( sizeof(struct c) == 8);
Dpacked-bitfield0.c9 _Static_assert(alignof(struct sa) == 1, "alignof(struct sa)");
10 _Static_assert( sizeof(struct sa) == 3, "sizeof(struct sa)");
20 _Static_assert(alignof(sa) == 1, "alignof(sa)"); in chk_align()
21 _Static_assert(alignof(*p) == 1, "alignof(*p)"); in chk_align()
Denum-same-type.c8 _Static_assert([typeof(NIL)] == [typeof(NEG)], "enum same type");
9 _Static_assert([typeof(ONE)] == [typeof(NEG)], "enum same type");
10 _Static_assert([typeof(DUO)] == [typeof(NEG)], "enum same type");
Denum-base-type.c11 _Static_assert(sizeof(enum n) == sizeof(int), "+-1");
18 _Static_assert(sizeof(enum m) == sizeof(int), "+-1L");
24 _Static_assert(sizeof(enum p) == sizeof(int), "UL");
Denum+mode.c11 _Static_assert(sizeof(s.b) == 1, "");
12 _Static_assert(sizeof(s.w) == sizeof(long), "");
13 _Static_assert(sizeof(s.t) == sizeof(long long), "");
Dinteger-const-expr.c30 #define TEST(R, X) _Static_assert(ICE_P(X) == R, "ICE_P(" #X ") => " #R); \
31 _Static_assert(ICE_P(ICE_P(X)), "ICE_P2(" #X ")"); \
32 _Static_assert(CHX_P(X) == R, "CHX_P(" #X ") => " #R); \
33 _Static_assert(CST_P(X) == 1, "CST_P(" #X ")")
Denum-sign-extend.c6 _Static_assert([typeof(b)] == [long], "type");
7 _Static_assert(b == -1L, "value");
Denum-type-exotic.c10 _Static_assert([typeof(C)] == [enum foobar], "enum type"); in foo()
11 _Static_assert([typeof(C)] != [unsigned char], "char type"); in foo()
Dtype-attribute-align.c13 _Static_assert( sizeof(struct s) == 4 * sizeof(short), "size"); in main()
14 _Static_assert(alignof(struct s) == 2 * sizeof(short), "alignment"); in main()
Denum-bitwise-mixed.c12 _Static_assert(sizeof(AP) == sizeof(int), "is bad?");
20 _Static_assert(sizeof(BP) == sizeof(int), "is bad?");
Dautotype.c2 #define is_type(X, T) _Static_assert([typeof(X)] == [T], "")
4 #define is_type(X, T) _Static_assert(1, "")
Dchar-signed.c3 _Static_assert((char) -1 == -1, "plain char is not signed"); in foo()
Dchar-signed-native.c3 _Static_assert((char) -1 == -1, "plain char is not signed"); in foo()
Dchar-unsigned-native.c5 _Static_assert((char) -1 == (-1 & MASK), "plain char is not unsigned"); in foo()
/third_party/ltp/tools/sparse/sparse-src/validation/expand/
Dbuiltin_isdigit.c1 _Static_assert(__builtin_isdigit('0'));
2 _Static_assert(__builtin_isdigit('9'));
4 _Static_assert(!__builtin_isdigit(0));
5 _Static_assert(!__builtin_isdigit(' '));
6 _Static_assert(!__builtin_isdigit('z'));
/third_party/ltp/tools/sparse/sparse-src/validation/eval/
Dunqual-cast.c3 _Static_assert([typeof((cvr int) 0)] == [int]);
4 _Static_assert([typeof((cvr int *) 0)] == [cvr int *]);
/third_party/ltp/tools/sparse/sparse-src/validation/arch/
Dshort-wchar.c1 _Static_assert([__WCHAR_TYPE__] == [unsigned short], "short wchar");

123