On Tue, Jun 05, 2007 at 09:37:36AM +0800, WANG Cong wrote:
> I agree. Local labels maybe useful in macros.
> If someone will use local labels in his code some day, we shouldn't force him
> to align his labels in the first column.
No, we should just force him to rewrite his dreck into a readable f
On Tue, Jun 05, 2007 at 11:16:13AM +0200, Rene Herman wrote:
>On 06/05/2007 04:10 AM, WANG Cong wrote:
>
>>On Mon, Jun 04, 2007 at 01:57:51PM -0400, Jeff Garzik wrote:
>
>>>A matter of opinion :) I tend to think goto is special enough to
>>>warrant column 1 unconditionally. It is special, so it d
On 06/05/2007 04:10 AM, WANG Cong wrote:
On Mon, Jun 04, 2007 at 01:57:51PM -0400, Jeff Garzik wrote:
A matter of opinion :) I tend to think goto is special enough to
warrant column 1 unconditionally. It is special, so it draws additional
attention over and above case labels.
I and others
On Mon, Jun 04, 2007 at 07:31:27PM -0700, H. Peter Anvin wrote:
>Jeff Garzik wrote:
>>>
>>> So, it seems that we can reach an agreement. Any other comments or
>>> suggestions?
>>> Or can someone ack/merge this patch?
>>
>> Honestly, I think not reaching an agreement is a good thing.
>>
>> "style
Jeff Garzik wrote:
>>
>> So, it seems that we can reach an agreement. Any other comments or
>> suggestions?
>> Or can someone ack/merge this patch?
>
> Honestly, I think not reaching an agreement is a good thing.
>
> "style" is always ultimately in the eye of the beholder, and reasoned
> people
On Tue, Jun 05, 2007 at 10:10:27AM +0800, WANG Cong wrote:
> On Mon, Jun 04, 2007 at 01:57:51PM -0400, Jeff Garzik wrote:
> >On Mon, Jun 04, 2007 at 10:43:51AM -0700, H. Peter Anvin wrote:
> >> Jan Engelhardt wrote:
> >> > On Jun 4 2007 10:27, H. Peter Anvin wrote:
> >> >> Jeff Garzik wrote:
> >> >
On Mon, Jun 04, 2007 at 01:57:51PM -0400, Jeff Garzik wrote:
>On Mon, Jun 04, 2007 at 10:43:51AM -0700, H. Peter Anvin wrote:
>> Jan Engelhardt wrote:
>> > On Jun 4 2007 10:27, H. Peter Anvin wrote:
>> >> Jeff Garzik wrote:
>> >>> Seconded. All my code contains the goto label in the first column.
On Mon, Jun 04, 2007 at 12:02:28PM -0700, Jeremy Fitzhardinge wrote:
>Sam Ravnborg wrote:
>> If local(__label__) really so widely used in the kernel that it deserves
>> a place in coding-style?
>> A quick grep did not say so.
>>
>
>Probably not, and its use shouldn't be (even tacitly) encouraged
On Mon, Jun 04, 2007 at 10:43:51AM -0700, H. Peter Anvin wrote:
> Jan Engelhardt wrote:
> > On Jun 4 2007 10:27, H. Peter Anvin wrote:
> >> Jeff Garzik wrote:
> >>> Seconded. All my code contains the goto label in the first column.
> >>>
> >>> IMO any other goto label indentation is silly, because
Jeremy Fitzhardinge wrote:
> H. Peter Anvin wrote:
>> goto labels are scoped in one sense: they are only reachable from inside
>> the block they are defined in, so I would disagree with this statement.
>>
>
> Erm, no I think you're wrong there
Yeah, I realized I was talking out of my ass ther
Sam Ravnborg wrote:
> If local(__label__) really so widely used in the kernel that it deserves
> a place in coding-style?
> A quick grep did not say so.
>
Probably not, and its use shouldn't be (even tacitly) encouraged. It's
only really useful for defining a local label within a macro, and
th
H. Peter Anvin wrote:
> goto labels are scoped in one sense: they are only reachable from inside
> the block they are defined in, so I would disagree with this statement.
>
Erm, no I think you're wrong there (or we're talking at cross
purposes). They're visible to the whole function they're de
On Mon, Jun 04, 2007 at 04:19:38PM +0800, WANG Cong wrote:
>
> Lindent gets wrong when it meets goto labels. This should be fixed manually.
> And kernel's CodingStyle doesn't specify the indentation for goto labels
> explicitly.
>
> This patch adds specifications on those things about goto label
[EMAIL PROTECTED] wrote:
>>
>> You still want them to be associated with the level the bailout happens at.
>
> No, you want them associated with the level you bail out *TO*. Otherwise you
> get this:
>
Right, I misspoke.
-hpa
-
To unsubscribe from this list: send the line "unsubscribe
On Mon, 04 Jun 2007 10:43:51 PDT, "H. Peter Anvin" said:
> Jan Engelhardt wrote:
> > But gotos are special. ("Evil" minus the "it's good for unrolling in case
> > of an
> > error" case).
> So?
>
> You still want them to be associated with the level the bailout happens at.
No, you want them asso
Jan Engelhardt wrote:
> On Jun 4 2007 10:27, H. Peter Anvin wrote:
>> Jeff Garzik wrote:
>>> Seconded. All my code contains the goto label in the first column.
>>>
>>> IMO any other goto label indentation is silly, because it obscures the
>>> goto label within the code block.
>> I would have to di
On Jun 4 2007 10:27, H. Peter Anvin wrote:
>Jeff Garzik wrote:
>>
>> Seconded. All my code contains the goto label in the first column.
>>
>> IMO any other goto label indentation is silly, because it obscures the
>> goto label within the code block.
>
>I would have to disagree with this. IMNSH
Jeremy Fitzhardinge wrote:
> WANG Cong wrote:
>> I just wonder, if a goto label is nested in a while/for/if/switch block,
>> aligning it in
>> the first column maybe a bit ugly. (I know mostly it is not in any
>> while/for/if/switch block.)
>
> In general goto labels are not scoped, so there's n
Jeff Garzik wrote:
>
> Seconded. All my code contains the goto label in the first column.
>
> IMO any other goto label indentation is silly, because it obscures the
> goto label within the code block.
>
I would have to disagree with this. IMNSHO, a goto label is like a case
label, and they sh
Lindent gets wrong when it meets goto labels. This should be fixed manually.
And kernel's CodingStyle doesn't specify the indentation for goto labels
explicitly.
This patch adds specifications on those things about goto labels in
CodingStyle. And it is
against -rc3 source tree.
Thanks to Al Vi
On Sun, Jun 03, 2007 at 11:59:26PM -0700, Jeremy Fitzhardinge wrote:
>WANG Cong wrote:
>> I just wonder, if a goto label is nested in a while/for/if/switch block,
>> aligning it in
>> the first column maybe a bit ugly. (I know mostly it is not in any
>> while/for/if/switch block.)
>>
>
>In gen
WANG Cong wrote:
> I just wonder, if a goto label is nested in a while/for/if/switch block,
> aligning it in
> the first column maybe a bit ugly. (I know mostly it is not in any
> while/for/if/switch block.)
>
In general goto labels are not scoped, so there's no point in pretending
they are.
On Sun, Jun 03, 2007 at 11:35:43AM -0400, Jeff Garzik wrote:
>Randy Dunlap wrote:
>>On Sun, 3 Jun 2007 15:29:39 +0100 Al Viro wrote:
>>
>>>On Sun, Jun 03, 2007 at 10:24:50PM +0800, WANG Cong wrote:
>>>
+Do care when you use Lindent to indent your code, since it may use
spaces
+instea
Randy Dunlap wrote:
On Sun, 3 Jun 2007 15:29:39 +0100 Al Viro wrote:
On Sun, Jun 03, 2007 at 10:24:50PM +0800, WANG Cong wrote:
+Do care when you use Lindent to indent your code, since it may use spaces
+instead of tabs before a goto label and it may also align the label in a
+wrong positio
On Sun, 3 Jun 2007 15:29:39 +0100 Al Viro wrote:
> On Sun, Jun 03, 2007 at 10:24:50PM +0800, WANG Cong wrote:
>
> > +Do care when you use Lindent to indent your code, since it may use spaces
> > +instead of tabs before a goto label and it may also align the label in a
> > +wrong position. A got
On Sun, Jun 03, 2007 at 10:24:50PM +0800, WANG Cong wrote:
> +Do care when you use Lindent to indent your code, since it may use spaces
> +instead of tabs before a goto label and it may also align the label in a
> +wrong position. A goto label should be aligned in the column that is 8
> +charact
There are many people use Lindent to indent their code, but Lindent gets wrong
when it
meets goto labels. This should be fixed manually.
And kernel's CodingStyle doesn't specify the indentation for goto labels
explicitly.
This patch adds specifications on those things about goto labels in
Co
27 matches
Mail list logo