Top 5
bearophile
bearophileHUGS at lycos.com
Wed Oct 8 16:32:30 PDT 2008
Denis Koroskin:
> Is this really an error?
I think so.
> "for" body creates a new scope and alloca'ted
> memory is automatically released once you leave the block.
I think that's not true:
http://www.archive.geschichte.mpg.de/doc/susehilf/gnu/libc/Variable_Size_Automatic.html
>but all the blocks are freed when you exit the function that alloca was called from,<
In that code if you remove the "const" the program works, giving two different addresses.
Bye,
bearophile
More information about the Digitalmars-d
mailing list