Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 2009 12:10:44 -0700
From:      "John Gemignani" <john.gemignani@isilon.com>
To:        <deeptech71@gmail.com>, <freebsd-hackers@freebsd.org>
Subject:   RE: C99: Suggestions for style(9)
Message-ID:  <108501c9c8fe$3a30ab0e$72020a0a@desktop.isilon.com>

next in thread | raw e-mail | index | archive | help

Because the logical grouping makes the most sense to the author of the code, not the person who has to learn or maintain it.

Are local variables allocated on-the-fly on the stack or does the compiler preallocate the space on entry? If I have to delve into a crashdump, having the variables on the big entry allocation has been very helpful in the past.

John

-----Original Message-----
From: deeptech71@gmail.com <deeptech71@gmail.com>
Sent: Wednesday, April 29, 2009 11:23 AM
To: freebsd-hackers@freebsd.org <freebsd-hackers@freebsd.org>
Subject: Re: C99: Suggestions for style(9)

Christoph Mallon wrote:
>> -When declaring variables in functions declare them sorted by size,
>> -then in alphabetical order; multiple ones per line are okay.
>> +When declaring variables in functions declare them sorted in 
>> alphabetical order;

What's wrong with logical grouping, especially when the new localized 
declaration style is used (so tons of variables are not declared at a 
time anymore)?

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?108501c9c8fe$3a30ab0e$72020a0a>