jacob-carlborg / orange

A serialization library for the D programming language.
71 stars 15 forks source link

compiling with GDC #17

Open Numpsy opened 12 years ago

Numpsy commented 12 years ago

I just tried building the test code from issue #16 with GDC-MingW (The gcc-4.6.1-tdm64-1-gdc-7e1a98da2769-20120428-D2.058 build from https://bitbucket.org/goshawk/gdc/downloads), and got the error:

orange\orange\serialization\Serializer.d: In member function 'getSerializedReference': orange\orange\serialization\Serializer.d:1561:0: error: cannot convert to a pointer type orange\orange\serialization\Serializer.d: In member function 'addSerializedReference': orange\orange\serialization\Serializer.d:1522:0: error: cannot convert to a pointer type

Where T is A[string].

jacob-carlborg commented 12 years ago

This compiles with DMD. So is this a problem with my code or GDC?

Numpsy commented 12 years ago

It looks like the issue is that

int[string] a;   
auto b = cast(void*) a;

compiles with DMD, but fails with

  error: cannot convert to a pointer type

on GDC. I don't know if this is supposed to work or not.