On Monday, 27 May 2013 at 23:25:37 UTC, Hans W. Uhlig wrote:
This also makes compiling LDC with clang rather difficult
[ 1%] Building CXX object
CMakeFiles/LDCShared.dir/dmd2/func.c.o
/root/llvm/src/ldc/dmd2/func.c:540:18: error: case value
evaluates to -2, which cannot be narrowed to type 'size_t' (aka
'unsigned long') [-Wc++11-narrowing]
case -2: // can't determine because of fwd refs
^
/root/llvm/src/ldc/dmd2/func.c:503:18: error: case value
evaluates to -1, which cannot be narrowed to type 'size_t' (aka
'unsigned long') [-Wc++11-narrowing]
case -1:
^
/root/llvm/src/ldc/dmd2/func.c:632:22: error: case value
evaluates to -2, which cannot be narrowed to type 'size_t' (aka
'unsigned long') [-Wc++11-narrowing]
case -2:
^
/root/llvm/src/ldc/dmd2/func.c:629:22: error: case value
evaluates to -1, which cannot be narrowed to type 'size_t' (aka
'unsigned long') [-Wc++11-narrowing]
case -1:
There were discussions raised in the past about dmd source
compile warnings which are generated by enabling some warning
options. Depending on which switches are turned on, compiler can
produce from 100 up to 10_000 warnings. Most of them are useless
since they do not perform flow analysis (for example, those
complains about variables may being not initialized which ignore
assertions) or are issued in dirty backend code. It is extremly
unlikely to extract something worth fixing from such large amount
of messages. Dmd sources are at everyday look of dozen
developers, so there is low probability to get from warnings
something useful which solves potential problem.
I use conservative number of warning switches which produces two
warnings in current dmd git sources - one about obsolete cast
from string type to char*, and the second about ignoring __cdecl
attribute. I don't bother to fix them.