Thread overview
Method signature differences in core modules on dmd and gdc?
Oct 12, 2014
Gary Willoughby
Oct 12, 2014
ketmar
Oct 12, 2014
Iain Buclaw
Oct 12, 2014
Gary Willoughby
Oct 12, 2014
ketmar
October 12, 2014
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?
October 12, 2014
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.


October 12, 2014
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.
October 12, 2014
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?
October 12, 2014
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 = 0 ) pure nothrow

and this is from current dmd HEAD:

  static void* calloc( size_t sz, uint ba = 0, const TypeInfo ti = null ) pure nothrow