Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120629204402.GA1248@openwall.com>
Date: Sat, 30 Jun 2012 00:44:02 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: GPU formats vs. -Wdeclaration-after-statement

Dhiru, all -

On Fri, Jun 29, 2012 at 10:38:22PM +0200, Lukas Odzioba wrote:
> 2012/6/29 magnum <john.magnum@...hmail.com>:
> > Wtf, did you just fix every single one of them? I owe you a truckload of
> > trainloads of I do not know what, of beers.
> 
> :)

BTW, it appeared like some of this kind of fixes (made a few days ago),
perhaps Dhiru's, were too aggressive.  Specifically, this is OK and does
not need fixing:

void f(void)
{
...
	while (cond) {
		int var;
		...
	}
}

What I think I've seen is "int var;" being moved to start of function in
such cases.  This is not the kind of change we want to be making.  When
there's already a block inside a function, and a variable can be local
to that scope - it should stay there.

What we're trying to enforce is that variables be declared at the start
of each block, before the first statement.

Alexander

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.