[ovs-dev] [PATCH 1/5] CodingStyle: Allow C99 mixing of declarations and code.
blp at nicira.com
Wed May 28 23:55:19 UTC 2014
On Wed, May 28, 2014 at 04:52:59PM -0700, Jarno Rajahalme wrote:
> On May 28, 2014, at 4:00 PM, Ethan Jackson <ethan at nicira.com> wrote:
> > FWIW I'd prefer we don't mix declarations and code unless there's a
> > clear reason to do it from a simplicity perspective. I.E. I think we
> > should go from mandating that it's never allowed, to suggesting that
> > it's discouraged. The reason is that most of the code doesn't do
> > these things, and there's a value in consistency. That said, I don't
> > feel strongly about it.
> Does this cut it for you:
> C DIALECT
> Most C99 features are OK because they are widely implemented:
> * Mixing of declarations and code within a block. Please use this
> judiciously; keep declarations nicely grouped together in the
> beginning of a block if possible.
Perfect! As we settle more comfortably into the more relaxed style,
we can correspondingly relax this statement.
More information about the dev