I thought this was in a bug report already, but I can't find it so I probably picked it up somewhere on some mailing list or on an internet forum.
The uninitialized parts of an auto(matic) local variable are not cleared to zero when an incomplete initializer is used. E.g.
void foo(void)
{
char x[5] = { 1, 2 };
ASSERT (x[3] == 0);
}
Regression test zeropad.c has some tests for incomplete initializers but not for auto's.
Maarten
Logged In: YES
user_id=888171
Originator: YES
Ok, I filed this only for the record because I just fixed it in SDCC 2.8.1 #5186.
Logged In: YES
user_id=1788180
Originator: NO
You could have noticed it here:
Some spotted SDCC 2.6.0 '52 pitfalls
http://www.cygnal.org/ubb/Forum10/HTML/000051.html
Point 4 in first post.