Fix windows build

This commit is contained in:
Alan Mishchenko 2026-08-15 09:35:04 -07:00
parent 12eb48b476
commit 094c1ca741
1 changed files with 3 additions and 5 deletions

View File

@ -288,11 +288,9 @@ enum sn_obj_type_enum
SN_OBJ_TYPE_COUNT SN_OBJ_TYPE_COUNT
}; };
#ifdef __cplusplus // Use a negative-size array as a compile-time check because ABC is also built
static_assert(SN_OBJ_TYPE_COUNT <= UINT8_MAX, "sn_obj_type_t cannot represent every object type"); // as C by MSVC, whose C frontend does not accept the C11 _Static_assert keyword.
#else typedef char sn_obj_type_count_must_fit_in_uint8_t[(SN_OBJ_TYPE_COUNT <= UINT8_MAX) ? 1 : -1];
_Static_assert(SN_OBJ_TYPE_COUNT <= UINT8_MAX, "sn_obj_type_t cannot represent every object type");
#endif
typedef enum sn_mux_fanin_t typedef enum sn_mux_fanin_t
{ {