This little program
const xyz = 123
var foobar:int
echo "hello world"
lives in /tmp/testit.nim. Compiling (on an up-to-date Arch Linux system) doesn't produce an "unused symbols" hint, despite explicitly turning it on (I think it's on by default):
dca@franz:/tmp$ nim compile --hint[XDeclaredButNotUsed]:on testit.nim Hint: used config file '/home/dca/.nim/config/nim.cfg' [Conf] Hint: system [Processing] Hint: testit [Processing] CC: testit Hint: [Link] Hint: operation successful (12399 lines compiled; 0.204 sec total; 16.379MiB peakmem; Debug Build) [SuccessX]
Nim version:
dca@franz:/tmp$ nim -v Nim Compiler Version 0.19.6 [Linux: amd64] Compiled at 2019-05-10 Copyright (c) 2006-2018 by Andreas Rumpf git hash: c6f601d48ec81e0d6e052ba0d19a195b55cc68f2 active boot switches: -d:release
One issue that may or may not be relevant: trying to install Nim yesterday with
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
failed (twice) with a segfault. So I installed by downloading the tar file and building manually. The resulting directory is in ~/.nim and I've added ~/.nim/bin to my PATH.
Is the lack of mention of the unused symbols a compiler problem, or am I missing something?