Re: [RFC] Documentation/CodingStyle: Add rules for goto labels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 pretending
> they are.  It might make sense to indent a label deeper if you've
> actually declared it local (__label__).
> 

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.

	-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux