Closed
Bug 824390
Opened 12 years ago
Closed 12 years ago
DMD failing to build with clang 3.2
Categories
(Core :: DMD, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(1 file)
741 bytes,
patch
|
justin.lebar+bug
:
review+
|
Details | Diff | Splinter Review |
I just updated my Linux box to Ubuntu 12.10, which uses clang 3.2. I'm getting this compile failure: 1:50.80 /home/njn/moz/mi2/memory/replace/dmd/DMD.cpp:321:14: error: expected expression 1:50.80 : mMutex(PTHREAD_MUTEX_INITIALIZER) 1:50.80 ^ 1:50.80 /usr/include/pthread.h:90:3: note: expanded from macro 'PTHREAD_MUTEX_INITIALIZER' 1:50.80 { { 0, 0, 0, 0, 0, 0, { 0, 0 } } } 1:50.80 ^ 1:50.83 1 error generated. 1:50.83 It compiles with GCC 4.7. The problem is demonstrated more clearly by this test program: struct X { int x1; }; class Y { X x; Y() : x({0}) {} }; g++ says: a.cpp: In constructor ‘Y::Y()’: a.cpp:7:12: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] a.cpp:7:16: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] but clang++ just says: a.cpp:7:13: error: expected expression Y() : x({0}) {} But |clang++ -std=c++11| accepts it. Hmm.
Updated•12 years ago
|
Attachment #695369 -
Flags: review?(justin.lebar+bug) → review+
Comment 2•12 years ago
|
||
Hm. Actually, do we know that pthread_mutex_init doesn't allocate?
Assignee | ||
Comment 3•12 years ago
|
||
> Hm. Actually, do we know that pthread_mutex_init doesn't allocate?
PTHREAD_MUTEX_INITIALIZER clearly doesn't, so I'm willing to assume that pthread_mutex_init doesn't.
Comment 4•12 years ago
|
||
Living dangerously, sgtm. :)
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4aeb3016da03
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4aeb3016da03
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Assignee | ||
Updated•12 years ago
|
Component: General → DMD
You need to log in
before you can comment on or make changes to this bug.
Description
•