diff options
author | Johan Pascal <johan.pascal@linphone.org> | 2020-11-23 22:38:06 +0100 |
---|---|---|
committer | Johan Pascal <johan.pascal@linphone.org> | 2020-11-23 22:38:06 +0100 |
commit | 38284bca28fc837916c1d6a2164ee4a16375e00c (patch) | |
tree | 671971d979eefa31d76cb98d76473e95518332af | |
parent | Expand bit to mask as inline function (diff) | |
download | goldilocks-38284bca28fc837916c1d6a2164ee4a16375e00c.tar.xz goldilocks-38284bca28fc837916c1d6a2164ee4a16375e00c.zip |
Restore clang array checks
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/p448/arch_x86_64/f_impl.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a30d37..b0f5f76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ else() set(STRICT_OPTIONS_C "${STRICT_OPTIONS_C} -std=c99 -O2 -Wstrict-prototypes -Wno-error=strict-prototypes -fvisibility=hidden") if(CMAKE_C_COMPILER_ID MATCHES "Clang") set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} -Wno-error=unknown-warning-option -Qunused-arguments -Wno-tautological-compare") - set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} -Wno-unused-function -Wno-array-bounds -Wno-pass-failed -Wno-error=sizeof-array-div") + set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} -Wno-unused-function -Wno-pass-failed") endif() if(ENABLE_STRICT) set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} -Werror -Wextra -Wno-unused-parameter -fno-strict-aliasing") diff --git a/src/p448/arch_x86_64/f_impl.c b/src/p448/arch_x86_64/f_impl.c index 1e1d76d..1f689f2 100644 --- a/src/p448/arch_x86_64/f_impl.c +++ b/src/p448/arch_x86_64/f_impl.c @@ -15,7 +15,7 @@ void gf_mul (gf_s *__restrict__ cs, const gf as, const gf bs) { /* For some reason clang doesn't vectorize this without prompting? */ unsigned int i; - for (i=0; i<sizeof(aa)/sizeof(uint64xn_t); i++) { + for (i=0; i<sizeof(aa)/(sizeof(uint64xn_t)); i++) { ((uint64xn_t*)aa)[i] = ((const uint64xn_t*)a)[i] + ((const uint64xn_t*)(&a[4]))[i]; ((uint64xn_t*)bb)[i] = ((const uint64xn_t*)b)[i] + ((const uint64xn_t*)(&b[4]))[i]; ((uint64xn_t*)bbb)[i] = ((const uint64xn_t*)bb)[i] + ((const uint64xn_t*)(&b[4]))[i]; @@ -190,7 +190,7 @@ void gf_sqr (gf_s *__restrict__ cs, const gf as) { /* For some reason clang doesn't vectorize this without prompting? */ unsigned int i; - for (i=0; i<sizeof(aa)/sizeof(uint64xn_t); i++) { + for (i=0; i<sizeof(aa)/(sizeof(uint64xn_t)); i++) { ((uint64xn_t*)aa)[i] = ((const uint64xn_t*)a)[i] + ((const uint64xn_t*)(&a[4]))[i]; } |