[Issue 4418] Is alloca() pure?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 13 09:44:57 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4418


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from bearophile_hugs at 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: -------


More information about the Digitalmars-d-bugs mailing list