c99/c++ localised variable definition

David Schultz das at FreeBSD.ORG
Mon Jan 31 08:41:44 PST 2005


On Mon, Jan 31, 2005, Paul Richards wrote:
> Ok, to sum up  the discussion then:
> 
> 1) In the kernel the issue of stack usage is a relevant consideration
> against adopting the new style.

Is it?  In my experience, gcc 3.X does a proper liveness analysis
at -O1 and higher, and reuses stack space pretty well.  This is an
elementary optimization.  (Some people don't seem to trust the
compiler to do this, so they do evil things such as reuse an
identifier to mean two different things in the same function.)


More information about the freebsd-arch mailing list