[botan-devel] Compiler warning going to Android NDK v10 from v9

john skaller skaller at users.sourceforge.net
Tue Jan 13 18:45:08 EST 2015


On 14/01/2015, at 8:12 AM, William K. Foster wrote:

> Hello,
> 
> I've been building Botan v1.10.9 successfully for Android using the Native Development Kit v9, however, when I try to go to v10 of the NDK, I get the following warning:
> 
> [armeabi] Compile++ thumb: botan <= botan_all.cpp
> /Users/wkf/sds/flume/android/workspace/jni/botan/botan_all.cpp: In function 'void Botan::{anonymous}::BMW_512_compress(Botan::u64bit*, const u64bit*, Botan::u64bit*)':
> /Users/wkf/sds/flume/android/workspace/jni/botan/botan_all.cpp:25863:36: warning: iteration 7u invokes undefined behavior [-Waggressive-loop-optimizations]
>                 (0x0555555555555555 * i)) ^ H[(i-16+7)%16]);

Shouldn't that constant be unsigned?

BTW: gcc doesn't just make these warnings gratuitously, it actively
exploits undefined behaviour to perform loop optimisations.

--
john skaller
skaller at users.sourceforge.net
http://felix-lang.org





More information about the botan-devel mailing list