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
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
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
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.
>>
>>
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 is always ultimately
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 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 draws
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)
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,
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
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
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
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
[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
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
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.
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
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
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
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
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.
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. It
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 general goto
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
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 should
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 no point in
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. IMNSHO, a goto
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 disagree with
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 associated with the
[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, 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 labels in
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
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
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 there when
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 it obscures the
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. It's
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:
Seconded. All my
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.
IMO any
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 come up with
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
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
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
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
>
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
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
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
+characters
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 goto label
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
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
+instead of tabs before a
54 matches
Mail list logo