Searched refs:_Static_assert (Results 1 – 25 of 70) sorted by relevance
123
/third_party/ltp/tools/sparse/sparse-src/validation/ |
D | static_assert.c | 1 _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 …]
|
D | enum-sign-gcc.c | 19 _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 …]
|
D | init-wstring.c | 2 _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 *));
|
D | enum-min-size.c | 2 _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");
|
D | packed-struct.c | 13 _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");
|
D | array-implicit-size.c | 2 _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");
|
D | enum-bounds.c | 4 _Static_assert([typeof(IMAX)] == [int], ""); 9 _Static_assert([typeof(IMP1)] == [unsigned int], ""); 14 _Static_assert([typeof(IMM1)] == [int], ""); 19 _Static_assert([typeof(IMM2)] == [long], "");
|
D | enum-bitwise.c | 12 _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");
|
D | packed-bitfield3.c | 15 _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);
|
D | packed-bitfield0.c | 9 _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()
|
D | enum-same-type.c | 8 _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");
|
D | enum-base-type.c | 11 _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");
|
D | enum+mode.c | 11 _Static_assert(sizeof(s.b) == 1, ""); 12 _Static_assert(sizeof(s.w) == sizeof(long), ""); 13 _Static_assert(sizeof(s.t) == sizeof(long long), "");
|
D | integer-const-expr.c | 30 #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 ")")
|
D | enum-sign-extend.c | 6 _Static_assert([typeof(b)] == [long], "type"); 7 _Static_assert(b == -1L, "value");
|
D | enum-type-exotic.c | 10 _Static_assert([typeof(C)] == [enum foobar], "enum type"); in foo() 11 _Static_assert([typeof(C)] != [unsigned char], "char type"); in foo()
|
D | type-attribute-align.c | 13 _Static_assert( sizeof(struct s) == 4 * sizeof(short), "size"); in main() 14 _Static_assert(alignof(struct s) == 2 * sizeof(short), "alignment"); in main()
|
D | enum-bitwise-mixed.c | 12 _Static_assert(sizeof(AP) == sizeof(int), "is bad?"); 20 _Static_assert(sizeof(BP) == sizeof(int), "is bad?");
|
D | autotype.c | 2 #define is_type(X, T) _Static_assert([typeof(X)] == [T], "") 4 #define is_type(X, T) _Static_assert(1, "")
|
D | char-signed.c | 3 _Static_assert((char) -1 == -1, "plain char is not signed"); in foo()
|
D | char-signed-native.c | 3 _Static_assert((char) -1 == -1, "plain char is not signed"); in foo()
|
D | char-unsigned-native.c | 5 _Static_assert((char) -1 == (-1 & MASK), "plain char is not unsigned"); in foo()
|
/third_party/ltp/tools/sparse/sparse-src/validation/expand/ |
D | builtin_isdigit.c | 1 _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/ |
D | unqual-cast.c | 3 _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/ |
D | short-wchar.c | 1 _Static_assert([__WCHAR_TYPE__] == [unsigned short], "short wchar");
|
123