Home
last modified time | relevance | path

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

12

/illumos-gate/usr/src/tools/smatch/src/validation/
H A 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 …]
H A 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 …]
H A 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");
H A 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");
H A 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], "");
H A 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");
H A 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");
H A 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");
H A 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), "");
H A 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 ")")
H A 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()
H A Denum-bitwise-mixed.c12 _Static_assert(sizeof(AP) == sizeof(int), "is bad?");
20 _Static_assert(sizeof(BP) == sizeof(int), "is bad?");
H A Dchar-signed.c3 _Static_assert((char) -1 == -1, "plain char is not signed"); in foo()
H A Dchar-unsigned.c5 _Static_assert((char) -1 == (-1 & MASK), "plain char is not unsigned"); in foo()
H A Dvla-sizeof-ice.c7 #define TEST(x, r) _Static_assert(T(x) == r, #x " => " #r)
H A Dabi-integer.c2 _Static_assert(sizeof(T) == S && _Alignof(T) == A, #T)
H A Dreserved.c53 static int (_Static_assert); variable
/illumos-gate/usr/src/compat/bhyve/sys/
H A Dcdefs.h72 #define _Static_assert(x, y) static_assert(x, y) macro
76 #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) macro
81 #define _Static_assert(x, y) struct __hack macro
84 #define static_assert(x, y) _Static_assert(x, y)
/illumos-gate/usr/src/contrib/bhyve/dev/nvme/
H A Dnvme.h791 _Static_assert(sizeof(struct nvme_registers) == 0x1008, "bad size for nvme_registers");
823 _Static_assert(sizeof(struct nvme_sgl_descriptor) == 16, "bad size for nvme_sgl_descriptor");
859 _Static_assert(sizeof(struct nvme_command) == 16 * 4, "bad size for nvme_command");
877 _Static_assert(sizeof(struct nvme_completion) == 4 * 4, "bad size for nvme_completion");
888 _Static_assert(sizeof(struct nvme_dsm_range) == 16, "bad size for nvme_dsm_ranage");
1157 _Static_assert(sizeof(struct nvme_power_state) == 32, "bad size for nvme_power_state");
1412 _Static_assert(sizeof(struct nvme_controller_data) == 4096, "bad size for nvme_controller_data");
1525 _Static_assert(sizeof(struct nvme_namespace_data) == 4096, "bad size for nvme_namepsace_data");
1584 _Static_assert(sizeof(struct nvme_error_information_entry) == 64, "bad size for nvme_error_informat…
1630 _Static_assert(sizeof(struct nvme_health_information_page) == 512, "bad size for nvme_health_inform…
[all …]
/illumos-gate/usr/src/boot/include/
H A Dassert.h71 #define static_assert _Static_assert
/illumos-gate/usr/src/head/
H A Dassert.h55 #define static_assert _Static_assert
/illumos-gate/usr/src/boot/libsa/
H A Dquad.h57 _Static_assert(sizeof(quad_t) == sizeof(int) * 2,
/illumos-gate/usr/src/tools/smatch/src/
H A Dident-list.h43 IDENT_RESERVED(_Static_assert);
/illumos-gate/usr/src/boot/sys/sys/
H A Dcdefs.h297 #define _Static_assert(x, y) static_assert(x, y) macro
301 #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) macro
306 #define _Static_assert(x, y) struct __hack macro
/illumos-gate/usr/src/uts/common/sys/
H A Ddebug.h137 #define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")

12