Date: Fri, 15 Feb 2019 03:35:23 +0000 From: "jounijl@...oo.co.uk" <jounijl@...oo.co.uk> To: musl@...ts.openwall.com Subject: "Arithmetic exception" with modulus operator '%' As in the headline. Program stops and prints "Arithmetic exception" at the line where the modulus operator '%' is. I'm compiling in Alpine linux with clang installed from apk:s: clang -c test.c clang -o test test.o The code is: ----- snip ----- unsigned int unum = 0; unsigned int umod = 0; unsigned int ures = 0; ures = unum % umod; // <-- this one ----- /snip ----- The variables have some values other than 0. The environment is: The Alpine Linux is installed in Oracle Virtualbox in FreeBSD 12, 64-bit Intel. $ uname -a Linux localhost 4.14.89-0-vanilla #1-Alpine SMP Tue Dec 18 16:10:10 UTC 2018 x86_64 GNU/Linux $ clang --version Alpine clang version 5.0.1 (tags/RELEASE_501/final) (based on LLVM 5.0.1) What does this? Do I need to include some library? w.b.reg., Jouni
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.