-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors with Clang in C++11 mode #330
Comments
[ 0%] Building CXX object CMakeFiles/LDCShared.dir/dmd2/func.c.o |
I never tried it but I can imagine that the DMD source is not C++11 compatible. Did you try to compile LDC without |
I'm only using the default clang settings. Not adding anything special. |
Build Script below rm -Rf ~/llvm |
Side note: "case value evaluates to -2, which cannot be narrowed to type 'size_t' " Why is the input an unsigned value and the case is negative... that seems very naughty. |
Ah, so the C++11 option is leaking in from the LLVM CFLAGS? I think the best thing to do would just be to fix the DMD source. Regarding -1/-2, DMD uses such "special" unsigned values (i.e. size_t.max, size_t.max - 1, …) quite liberally. |
@huhlig: To test my hypothesis, could you please run |
This is an upstream problem, the DMD source does not compile with Clang and C++11 enabled yet. |
I am closing this issue because LDC can now be compiled with |
Fill out core.sys.posix.sys.select for Solaris.
/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:
^
4 errors generated.
make[2]: *** [CMakeFiles/LDCShared.dir/dmd2/func.c.o] Error 1
The text was updated successfully, but these errors were encountered: