lkml.org 
[lkml]   [2000]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] removal of "static foo = 0"
From

[Albert D. Cahalan]
> Choosing an initializer that tends to catch unintended reliance on
> zeroed data would be good. Too bad it is too late to fix.

Why would that be good? Why is it bad to accidentally rely on zeroed
data, if the data is in fact guaranteed to be zeroed? It's not like
this is going to change out from under us in a year. You said it
yourself: we can do whatever we want here. And I don't see why we
would ever want to do anything other than zero it.

> Go back and read the rest of this thread. Examples have been provided
> (not by me) of such code leading to latter mistakes.

Oh please, how hard can it be to type

static int foo; // = 0

as opposed to

static int foo = 0;

If the two produced the same object code, the second would be better,
but they don't, so it isn't. Patch gcc, if you care enough (and feel
you can convince the gcc steering committee to care enough).

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:47    [W:0.067 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site