diff --git a/fiat-bedrock2/src/curve25519_32.c b/fiat-bedrock2/src/curve25519_32.c index 095f7ec13c..7980f9976c 100644 --- a/fiat-bedrock2/src/curve25519_32.c +++ b/fiat-bedrock2/src/curve25519_32.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/curve25519_64.c b/fiat-bedrock2/src/curve25519_64.c index 029d75c6eb..f0a04a39c3 100644 --- a/fiat-bedrock2/src/curve25519_64.c +++ b/fiat-bedrock2/src/curve25519_64.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/curve25519_scalar_32.c b/fiat-bedrock2/src/curve25519_scalar_32.c index c80f5368ac..2cd3e69f27 100644 --- a/fiat-bedrock2/src/curve25519_scalar_32.c +++ b/fiat-bedrock2/src/curve25519_scalar_32.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/curve25519_scalar_64.c b/fiat-bedrock2/src/curve25519_scalar_64.c index 3ecc63804c..11e750c761 100644 --- a/fiat-bedrock2/src/curve25519_scalar_64.c +++ b/fiat-bedrock2/src/curve25519_scalar_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/curve25519_solinas_64.c b/fiat-bedrock2/src/curve25519_solinas_64.c index aa2992a056..2db9c33728 100644 --- a/fiat-bedrock2/src/curve25519_solinas_64.c +++ b/fiat-bedrock2/src/curve25519_solinas_64.c @@ -14,8 +14,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p224_32.c b/fiat-bedrock2/src/p224_32.c index 897f659e5e..49c3053f10 100644 --- a/fiat-bedrock2/src/p224_32.c +++ b/fiat-bedrock2/src/p224_32.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p224_64.c b/fiat-bedrock2/src/p224_64.c index 38bc5ac52c..a4806cbfa7 100644 --- a/fiat-bedrock2/src/p224_64.c +++ b/fiat-bedrock2/src/p224_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p256_32.c b/fiat-bedrock2/src/p256_32.c index d5eba4a6ea..2971d1b64b 100644 --- a/fiat-bedrock2/src/p256_32.c +++ b/fiat-bedrock2/src/p256_32.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p256_64.c b/fiat-bedrock2/src/p256_64.c index 81a90013df..c1291254ec 100644 --- a/fiat-bedrock2/src/p256_64.c +++ b/fiat-bedrock2/src/p256_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p256_scalar_32.c b/fiat-bedrock2/src/p256_scalar_32.c index 3cf8e351bc..a940f221b8 100644 --- a/fiat-bedrock2/src/p256_scalar_32.c +++ b/fiat-bedrock2/src/p256_scalar_32.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p256_scalar_64.c b/fiat-bedrock2/src/p256_scalar_64.c index 27257d3f64..ae52f85534 100644 --- a/fiat-bedrock2/src/p256_scalar_64.c +++ b/fiat-bedrock2/src/p256_scalar_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p384_32.c b/fiat-bedrock2/src/p384_32.c index 3e6e7ace8f..ad9b89dde5 100644 --- a/fiat-bedrock2/src/p384_32.c +++ b/fiat-bedrock2/src/p384_32.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p384_64.c b/fiat-bedrock2/src/p384_64.c index 9d1a583c8a..9b892900a5 100644 --- a/fiat-bedrock2/src/p384_64.c +++ b/fiat-bedrock2/src/p384_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p384_scalar_32.c b/fiat-bedrock2/src/p384_scalar_32.c index 6818e48022..ba5732134a 100644 --- a/fiat-bedrock2/src/p384_scalar_32.c +++ b/fiat-bedrock2/src/p384_scalar_32.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p384_scalar_64.c b/fiat-bedrock2/src/p384_scalar_64.c index 17e0787809..587ab9a31d 100644 --- a/fiat-bedrock2/src/p384_scalar_64.c +++ b/fiat-bedrock2/src/p384_scalar_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p434_64.c b/fiat-bedrock2/src/p434_64.c index cfc59b6e5b..e16dabd9ad 100644 --- a/fiat-bedrock2/src/p434_64.c +++ b/fiat-bedrock2/src/p434_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p448_solinas_64.c b/fiat-bedrock2/src/p448_solinas_64.c index bf66c5e588..6ef691286c 100644 --- a/fiat-bedrock2/src/p448_solinas_64.c +++ b/fiat-bedrock2/src/p448_solinas_64.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p521_32.c b/fiat-bedrock2/src/p521_32.c index e49a41815d..1b5ff65aa9 100644 --- a/fiat-bedrock2/src/p521_32.c +++ b/fiat-bedrock2/src/p521_32.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/p521_64.c b/fiat-bedrock2/src/p521_64.c index 944ec35890..58463b51ef 100644 --- a/fiat-bedrock2/src/p521_64.c +++ b/fiat-bedrock2/src/p521_64.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/poly1305_32.c b/fiat-bedrock2/src/poly1305_32.c index 3c95de17f1..4b8aa9d9bf 100644 --- a/fiat-bedrock2/src/poly1305_32.c +++ b/fiat-bedrock2/src/poly1305_32.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/poly1305_64.c b/fiat-bedrock2/src/poly1305_64.c index 8093dfe6b2..92ecb99a93 100644 --- a/fiat-bedrock2/src/poly1305_64.c +++ b/fiat-bedrock2/src/poly1305_64.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/secp256k1_dettman_32.c b/fiat-bedrock2/src/secp256k1_dettman_32.c index 5975e4004b..b9cd1b5808 100644 --- a/fiat-bedrock2/src/secp256k1_dettman_32.c +++ b/fiat-bedrock2/src/secp256k1_dettman_32.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/secp256k1_dettman_64.c b/fiat-bedrock2/src/secp256k1_dettman_64.c index c79f5f3bd1..dba31320ff 100644 --- a/fiat-bedrock2/src/secp256k1_dettman_64.c +++ b/fiat-bedrock2/src/secp256k1_dettman_64.c @@ -19,8 +19,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/secp256k1_montgomery_32.c b/fiat-bedrock2/src/secp256k1_montgomery_32.c index fb265f7b5f..5466d18011 100644 --- a/fiat-bedrock2/src/secp256k1_montgomery_32.c +++ b/fiat-bedrock2/src/secp256k1_montgomery_32.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/secp256k1_montgomery_64.c b/fiat-bedrock2/src/secp256k1_montgomery_64.c index 11370a952b..f69976b4fa 100644 --- a/fiat-bedrock2/src/secp256k1_montgomery_64.c +++ b/fiat-bedrock2/src/secp256k1_montgomery_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/secp256k1_montgomery_scalar_32.c b/fiat-bedrock2/src/secp256k1_montgomery_scalar_32.c index fd989beb84..e0f2b76f04 100644 --- a/fiat-bedrock2/src/secp256k1_montgomery_scalar_32.c +++ b/fiat-bedrock2/src/secp256k1_montgomery_scalar_32.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/fiat-bedrock2/src/secp256k1_montgomery_scalar_64.c b/fiat-bedrock2/src/secp256k1_montgomery_scalar_64.c index c1c6695130..81e047417a 100644 --- a/fiat-bedrock2/src/secp256k1_montgomery_scalar_64.c +++ b/fiat-bedrock2/src/secp256k1_montgomery_scalar_64.c @@ -24,8 +24,10 @@ static __attribute__((constructor)) void _br2_preconditions(void) { static_assert(~(intptr_t)0 == -(intptr_t)1, "two's complement"); assert(((void)"two's complement", ~(intptr_t)0 == -(intptr_t)1)); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const uintptr_t){1})); - assert(((void)"little-endian", 1 == *(unsigned char *)&(const intptr_t){1})); + uintptr_t u = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&u)); + intptr_t i = 1; + assert(((void)"little-endian", 1 == *(unsigned char *)&i)); } // We use memcpy to work around -fstrict-aliasing. diff --git a/rupicola b/rupicola index e6daa5e6f0..0e001bb0cc 160000 --- a/rupicola +++ b/rupicola @@ -1 +1 @@ -Subproject commit e6daa5e6f08e20088caa550ebcb7a856711948d6 +Subproject commit 0e001bb0cc267d3ef6d19e9577fdc6f72bde26e3