[Issue 4418] Is alloca() pure?
http://d.puremagic.com/issues/show_bug.cgi?id=4418 --- Comment #2 from bearophile_h...@eml.cc 2010-07-13 09:47:55 PDT --- A D function that uses some kind of implementation of C99 Variable Length Arrays can be pure (and they get deallocated at the end of their scope, for example at the end of a for loop, and not only at the end of the function). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4418] Is alloca() pure?
http://d.puremagic.com/issues/show_bug.cgi?id=4418 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #1 from bearophile_h...@eml.cc 2010-07-13 09:44:55 PDT --- alloca() can't be pure because you can use alloca() inside a loop too (see bug 3822 ), and an expected optimization of pure functions is to pull them out of loops (because they always return the same result or throw an exception/error, see bug 4453 ). I prefer alloca() to free its memory only at the end of the function (and not at the end of the scope of the for loop). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---