C99: Suggestions for style(9)

John Gemignani john.gemignani at isilon.com
Wed Apr 29 19:22:59 UTC 2009


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 at gmail.com <deeptech71 at gmail.com>
Sent: Wednesday, April 29, 2009 11:23 AM
To: freebsd-hackers at freebsd.org <freebsd-hackers at 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 at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"


More information about the freebsd-hackers mailing list