/illumos-gate/usr/src/tools/smatch/src/validation/ |
H A 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 …]
|
H A 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 …]
|
H A 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");
|
H A 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");
|
H A 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], "");
|
H A 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");
|
H A 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");
|
H A 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");
|
H A 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), "");
|
H A 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 ")")
|
H A 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()
|
H A D | enum-bitwise-mixed.c | 12 _Static_assert(sizeof(AP) == sizeof(int), "is bad?"); 20 _Static_assert(sizeof(BP) == sizeof(int), "is bad?");
|
H A D | char-signed.c | 3 _Static_assert((char) -1 == -1, "plain char is not signed"); in foo()
|
H A D | char-unsigned.c | 5 _Static_assert((char) -1 == (-1 & MASK), "plain char is not unsigned"); in foo()
|
H A D | vla-sizeof-ice.c | 7 #define TEST(x, r) _Static_assert(T(x) == r, #x " => " #r)
|
H A D | abi-integer.c | 2 _Static_assert(sizeof(T) == S && _Alignof(T) == A, #T)
|
H A D | reserved.c | 53 static int (_Static_assert); variable
|
/illumos-gate/usr/src/compat/bhyve/sys/ |
H A D | cdefs.h | 72 #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 D | nvme.h | 791 _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 D | assert.h | 71 #define static_assert _Static_assert
|
/illumos-gate/usr/src/head/ |
H A D | assert.h | 55 #define static_assert _Static_assert
|
/illumos-gate/usr/src/boot/libsa/ |
H A D | quad.h | 57 _Static_assert(sizeof(quad_t) == sizeof(int) * 2,
|
/illumos-gate/usr/src/tools/smatch/src/ |
H A D | ident-list.h | 43 IDENT_RESERVED(_Static_assert);
|
/illumos-gate/usr/src/boot/sys/sys/ |
H A D | cdefs.h | 297 #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 D | debug.h | 137 #define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
|