Subject: uninitialized stack variables
From: Mike Nordell (tamlin@algonet.se)
Date: Thu May 11 2000 - 08:44:14 CDT
Since I've run into a lot of troubles regarding unitinialized stack
(auto) variables, do you know what _your_ compiler does with these in
debug builds?
Example:
void foo()
{
unsigned char bar;
...
// is bar initialized to something here (like zero)
// or is it "almost random"?
}
The reason for this question is that I've added _a bunch_ of asserts for
UT_Bool (that at the moment is typedef'd to unsigned char) to make sure
that it's only UT_TRUE or UT_FALSE, but if your compiler does zero the
stack these asserts will have no noticable effect for you.
/Mike - please reply to AbiWord-dev only
This archive was generated by hypermail 2b25 : Thu May 11 2000 - 07:49:05 CDT