From: Emilia Kasper Date: Fri, 4 Mar 2016 17:05:35 +0000 (+0100) Subject: Curve25519: fix const-initialization X-Git-Tag: OpenSSL_1_1_0-pre4~355 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=5b7af0dd6c9315ca76fba16813b66f5792c7fe6e Curve25519: fix const-initialization Clang is permissive of this, but gcc fails. Reviewed-by: Rich Salz --- diff --git a/crypto/ec/curve25519.c b/crypto/ec/curve25519.c index 7474b3cc9a..3dbf4ac2ab 100644 --- a/crypto/ec/curve25519.c +++ b/crypto/ec/curve25519.c @@ -62,10 +62,10 @@ * context. */ typedef int32_t fe[10]; -static const int64_t kBottom25Bits = 0x1ffffff; -static const int64_t kBottom26Bits = 0x3ffffff; -static const int64_t kTop39Bits = ~kBottom25Bits; -static const int64_t kTop38Bits = ~kBottom26Bits; +static const int64_t kBottom25Bits = 0x1ffffffLL; +static const int64_t kBottom26Bits = 0x3ffffffLL; +static const int64_t kTop39Bits = 0xfffffffffe000000LL; +static const int64_t kTop38Bits = 0xfffffffffc000000LL; static uint64_t load_3(const uint8_t *in) { uint64_t result;