Julian Elischer schrieb:
M. Warner Losh wrote:
In message: <49c5f88c.3070...@freebsd.org>
Andriy Gapon <a...@freebsd.org> writes:
: E.g. you can have a simple 3 line block where you need a local variable
: but that block is located 50 lines from start of an enclosing function.
: Very convenient when you need to quickly glance the variable's type
(not).
No you don't. There's absolutely nothing wrong with putting them at
the top. In fact, it is simpler, really, than having to go hunting
for dozens of different declarations. As someone who has spent a lot
of time looking at code, the time wasted looking for these damn-fool
things really adds up.
and in a complicated function, if you have them all over the place you
have no idea as to what the potential stack usage of the function is..
This matters in the kernel.
The declared local variables are neither a lower *nor* an upper bound
for stack usage.
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"