Bug 11354 – dmd2 wont compile properly under C++11/CLang

Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-25T10:54:00Z
Last change time
2014-04-26T19:47:06Z
Assigned to
nobody
Creator
huhlig

Comments

Comment #0 by huhlig — 2013-10-25T10:54:12Z
[ 1%] Building CXX object CMakeFiles/LDCShared.dir/dmd2/func.c.o src/ldc/dmd2/func.c:582: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 ^ src/ldc/dmd2/func.c:542:18: error: case value evaluates to -1, which cannot be narrowed to type 'size_t' (aka 'unsigned long') [-Wc++11-narrowing] case -1: ^ src/ldc/dmd2/func.c:674:22: error: case value evaluates to -2, which cannot be narrowed to type 'size_t' (aka 'unsigned long') [-Wc++11-narrowing] case -2: ^ src/ldc/dmd2/func.c:671:22: error: case value evaluates to -1, which cannot be narrowed to type 'size_t' (aka 'unsigned long') [-Wc++11-narrowing] case -1:
Comment #1 by yebblies — 2013-11-14T06:48:09Z
dmd is not written in C++11. It could be, but that is an enhancement.
Comment #2 by andrej.mitrovich — 2014-04-26T19:47:06Z
Marking as invalid. If we're moving to a self-hosting compiler then enabling C++11 compilation would give someone incentive to use C++11 syntax in the codebase, which would make auto-porting to D more difficult.