www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Method signature differences in core modules on dmd and gdc?

reply "Gary Willoughby" <dev nomad.so> writes:
I've been recently trying GDC out to compile some D code and i'm 
running into the problem of differing function signatures in core 
modules.

For example:

stack.d:79: error: function core.memory.GC.calloc (ulong sz, uint 
ba = 0u) is not callable using argument types (ulong, BlkAttr, 
TypeInfo_Array)
stack.d:110: error: function core.memory.GC.realloc (void* p, 
ulong sz, uint ba = 0u) is not callable using argument types 
(string*, ulong, BlkAttr, TypeInfo_Array)
<snip>

These compile fine using DMD. Anybody know what the issue is here?
Oct 12 2014
next sibling parent ketmar via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
On Sun, 12 Oct 2014 19:20:47 +0000
Gary Willoughby via Digitalmars-d-learn
<digitalmars-d-learn puremagic.com> wrote:

 These compile fine using DMD. Anybody know what the issue is here?
gdc is still 2.065, while official dmd is 2.066. signatures of this functions was changed inbetween. or maybe that was changed for upcoming 2.067, i don't remember.
Oct 12 2014
prev sibling parent reply "Iain Buclaw" <ibuclaw gdcproject.org> writes:
On Sunday, 12 October 2014 at 19:20:49 UTC, Gary Willoughby wrote:
 I've been recently trying GDC out to compile some D code and 
 i'm running into the problem of differing function signatures 
 in core modules.

 For example:

 stack.d:79: error: function core.memory.GC.calloc (ulong sz, 
 uint ba = 0u) is not callable using argument types (ulong, 
 BlkAttr, TypeInfo_Array)
 stack.d:110: error: function core.memory.GC.realloc (void* p, 
 ulong sz, uint ba = 0u) is not callable using argument types 
 (string*, ulong, BlkAttr, TypeInfo_Array)
 <snip>

 These compile fine using DMD. Anybody know what the issue is 
 here?
GDC is still on version 2.065.
Oct 12 2014
parent reply "Gary Willoughby" <dev nomad.so> writes:
On Sunday, 12 October 2014 at 19:34:30 UTC, Iain Buclaw wrote:
 On Sunday, 12 October 2014 at 19:20:49 UTC, Gary Willoughby 
 wrote:
 I've been recently trying GDC out to compile some D code and 
 i'm running into the problem of differing function signatures 
 in core modules.

 For example:

 stack.d:79: error: function core.memory.GC.calloc (ulong sz, 
 uint ba = 0u) is not callable using argument types (ulong, 
 BlkAttr, TypeInfo_Array)
 stack.d:110: error: function core.memory.GC.realloc (void* p, 
 ulong sz, uint ba = 0u) is not callable using argument types 
 (string*, ulong, BlkAttr, TypeInfo_Array)
 <snip>

 These compile fine using DMD. Anybody know what the issue is 
 here?
GDC is still on version 2.065.
Ah right, so these methods changed recently?
Oct 12 2014
parent ketmar via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
On Sun, 12 Oct 2014 22:05:16 +0000
Gary Willoughby via Digitalmars-d-learn
<digitalmars-d-learn puremagic.com> wrote:

 Ah right, so these methods changed recently?
yes. this is from gdc source: static void* calloc( size_t sz, uint ba =3D 0 ) pure nothrow and this is from current dmd HEAD: static void* calloc( size_t sz, uint ba =3D 0, const TypeInfo ti =3D null= ) pure nothrow
Oct 12 2014