Am 30.05.2012 09:33, schrieb Stefan Hajnoczi: > On Wed, May 30, 2012 at 3:26 AM, Anthony Liguori <aligu...@us.ibm.com> wrote: >> 3) It's not how the rest of QEMU is written. Consistency is the most >> important purpose of Coding Style. >> >> (3) is the most important consideration of all. > > Fair enough if its a style choice and you want QEMU to be consistent. > I'd love to use them because they keep variables and the code that > uses them together - great for checking that correct types are being > used during code review and also less noise in the patch. > > So if you ever change your mind about this, let me know and I'll never > declare a variable at the start of a function again :D.
You would have to find ways to bypass the block maintainer. ;-) I generally think it's good style to keep declarations together at the top of a block. Except sometimes. (And in some cases like VLAs it can even be necessary to have them in the middle of a function) Kevin