Optimizing out unnecessary allocations

Walter Bright newshound2 at digitalmars.com
Wed Oct 17 16:49:15 PDT 2012


On 10/17/2012 11:10 AM, David Nadlinger wrote:
 > Thus, my question: Is it legal for a D compiler to eliminate dead GC allocations
 > (given that there are no side effects due to constructors, …)?

Yes.

The test case can be fixed by attempting to use the result of new.


More information about the Digitalmars-d mailing list