undefined identifier destroy

Mike none at none.com
Wed Mar 26 06:48:13 PDT 2014


On Wednesday, 26 March 2014 at 13:44:56 UTC, Johannes Pfau wrote:
> Am Wed, 26 Mar 2014 13:20:48 +0000
> schrieb "Mike" <none at none.com>:
>
>> I get the an "undefined identifier destroy" message when 
>> trying to compile the following with GDC.
>> 
>> void main()
>> {
>>      X x = new X();
>>      destroy(x);
>> }
>> 
>> ...but it compiles fine in DMD 2.065.0.
>> 
>> I'm using a week-old build of 4.8.2.  Is this not implemented 
>> yet?
>> 
>> Mike
>
> Destroy was added to druntime years ago:
> https://github.com/D-Programming-GDC/GDC/blame/gdc-4.8/libphobos/libdruntime/object_.d#L2257
>
> (It's implemented in the library, so if you want to use it on
> bare-metal without druntime you'll have to rewrite it ;-)

Ah! silly me.  Thank you.  I expected a link error, though, for a 
missing library function.


More information about the D.gnu mailing list