On 2012-04-05 16:44:28 -0400, Robert Dewar wrote:
> On 4/5/2012 4:24 PM, Russ Allbery wrote:
> >Personally, as a matter of *style*, I eliminate such cases either by
> >initializing the variable or restructuring the function.  But this is very
> >much a question of style, not of correctness.
> 
> Indeed, and for me, when you are forced to do an initialization like
> this, it is mandatory to comment why you are initializing it, otherwise
> it obscures the code ("why is this being initialized, where is that
> value used?") and that ends up junky IMO. The Ada front end unfortunately
> has quite a few such commented junk initializations.

And moreover, perhaps in such a case, other compilers and/or future
GCC versions would give a warning because a value is set but not used.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to