compiler errors in 64bit builds

Bug #997175 reported by Richard Webb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
D Programming language Xml modules
Incomplete
Undecided
michaelrynn

Bug Description

Trying to compile as 64bit (either with DMD/Linux or GDC/MingW) produces a couple of compiler errors:

alt\zstring.d:1693: Error: cannot implicitly convert expression (this.records.opCmp(ro.records)) of type long to int

std/xml1.d:724: Error: opApply() function for KeyValueBlock!(string,string,true) must return an int
(there are several instances of this one).

Seems that it wants the return values to be int rather than intptr.

Revision history for this message
michaelrynn (michael-rynn-500) wrote :

Yes, D has these fixed return types. Why do I expect them to use the machine sized integer type? Fixed on Arch amd64 linux and fixed this. Added dmdbuild.d and build.sh. Will try and make dmdbuild.d work for windows and gdc as well.

Changed in d2-xml:
status: New → Fix Committed
assignee: nobody → michaelrynn (michael-rynn-500)
Revision history for this message
Richard Webb (numpsy) wrote :

I'm getting a bunch of other errors when compiling the latest source in 64bit using DMD 2.062 on Windows:

----------------------------------------------------------------
std\xmlp\domparse.d(645): Error: opApply() function for KeyValueBlock!(string, string, true) must return an int

std\xmlp\sliceparse.d(1200): Error: cannot implicitly convert expression (this.tagDepth()) of type long to int

std\xmlp\sliceparse.d(1765): Error: function std.xmlp.sliceparse.XmlStringParser.doContent.returnTextContent (int negadjust) is not callable using argument types (ulong)

std\xmlp\sliceparse.d(1765): Error: cannot implicitly convert expression (this.srcIX_ - this.tagPos_) of type ulong to int

std\xmlp\xmlparse.d(2008): Error: cannot implicitly convert expression (this.tagDepth()) of type long to int

std\xmlp\tagnest.d(87): Error: cannot implicitly convert expression (mid + 1LU) of type ulong to int

alt\buffer.d(1721): Error: cannot implicitly convert expression (this.records.opCmp(ro.records)) of type long to int
----------------------------------------------------------------

Changed in d2-xml:
status: Fix Committed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.