File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 7
7
#ifndef SECP256K1_ASSUMPTIONS_H
8
8
#define SECP256K1_ASSUMPTIONS_H
9
9
10
+ #include <limits.h>
11
+
10
12
#include "util.h"
11
13
12
14
/* This library, like most software, relies on a number of compiler implementation defined (but not undefined)
@@ -19,7 +21,11 @@ struct secp256k1_assumption_checker {
19
21
allowed. */
20
22
int dummy_array [(
21
23
/* Bytes are 8 bits. */
22
- CHAR_BIT == 8 &&
24
+ (CHAR_BIT == 8 ) &&
25
+
26
+ /* No integer promotion for uint32_t. This ensures that we can multiply uintXX_t values where XX >= 32
27
+ without signed overflow, which would be undefined behaviour. */
28
+ (UINT_MAX <= UINT32_MAX ) &&
23
29
24
30
/* Conversions from unsigned to signed outside of the bounds of the signed type are
25
31
implementation-defined. Verify that they function as reinterpreting the lower
You can’t perform that action at this time.
0 commit comments