lkml.org 
[lkml]   [2010]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [OT] Style Issues / Concerns
From
Date
James Kosin <jkosin@intcomgrp.com> writes:
>
> Before everyone jumps in at once, this is a simple example that will
> produce a compiler error about the misplaced else. However if there are
> many if statements above this that may allow the else to be paired up
> with it then the code will compile and there will be a serious and very
> difficult bug in the code that will take days or months to find.

Modern editors with auto indent mode makes it actually very easy
to find such bugs.

Also checkpatch.pl checks for it now I believe.

> Does the compiler produce smaller code without the braces {}?

No, it's very arbitary.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2010-03-22 21:15    [W:0.042 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site