Zero-length static array spec

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Fri Feb 6 09:43:07 PST 2015


On Fri, 06 Feb 2015 17:37:36 +0000, David Nadlinger wrote:

> On Friday, 6 February 2015 at 16:57:11 UTC, ketmar wrote:
>> that's easy: just start assigning increasing addresses from end of ram
>> or start of ram for each "infinitely small" local. as passing it's
>> address is an invalid operation, the only valid thing one can do is
>> compare it with null or some other address, and pass the result of
>> comparison, so it's ok.
> 
> You mean assigning during compilation by keeping some global state
> around somewhere? I think this would cause all kinds of issues with
> separate compilation and/or reproducibility of builds.

only for the current function. it doesn't matter if another function has 
the same addresses assigned, as it is allowed to reuse stack space. maybe 
even only for the current code block is enough.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150206/4c305b54/attachment.sig>


More information about the Digitalmars-d mailing list