File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 3737#include <stdint.h>
3838#include <stdio.h>
3939
40+ // intn doesn't depend on term
41+ _Static_assert (
42+ (int ) TermPositiveInteger == (int ) IntNPositiveInteger , "term/intn definition mismatch" );
43+ _Static_assert (
44+ (int ) TermNegativeInteger == (int ) IntNNegativeInteger , "term/intn definition mismatch" );
45+
46+ // Make sure avm_int_t can always fit into size_t
47+ _Static_assert (SIZE_MAX >= AVM_INT_MAX , "SIZE_MAX < AVM_INT_MAX is an unsupported configuration." );
48+
4049enum TermTypeIndex {
4150 TERM_TYPE_INDEX_INVALID = 0 ,
4251 TERM_TYPE_INDEX_INTEGER = 1 ,
Original file line number Diff line number Diff line change @@ -1476,12 +1476,6 @@ static inline bool term_is_bigint(term t)
14761476 && (term_boxed_size (t ) > (INTN_INT64_LEN * sizeof (intn_digit_t )) / sizeof (term ));
14771477}
14781478
1479- // intn doesn't depend on term
1480- _Static_assert (
1481- (int ) TermPositiveInteger == (int ) IntNPositiveInteger , "term/intn definition mismatch" );
1482- _Static_assert (
1483- (int ) TermNegativeInteger == (int ) IntNNegativeInteger , "term/intn definition mismatch" );
1484-
14851479/**
14861480 * @brief Extract multi-precision integer data from boxed term
14871481 *
Original file line number Diff line number Diff line change @@ -86,8 +86,6 @@ typedef uint64_t avm_uint64_t;
8686 #error "term size must be either 32 bit or 64 bit."
8787#endif
8888
89- _Static_assert (SIZE_MAX >= AVM_INT_MAX , "SIZE_MAX < AVM_INT_MAX is an unsupported configuration." );
90-
9189#define UNICODE_CHAR_MAX 0x10FFFF
9290
9391#define MIN_NOT_BOXED_INT (AVM_INT_MIN >> 4)
You can’t perform that action at this time.
0 commit comments