Re: [PATCH] removal of "static foo = 0"

Peter Samuelson
2000-11-29T03:52:47Z

[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