C++ dudes and dudettes:
Ogle this code:
static char * p;
struct Q { char * p; };
static Q q;
int main() {
assert(p == NULL);
assert(p.q == NULL);
}
Is its behavior well-defined? Will the assertions pass on any compliant C++
platform?
What I'm really asking is this: Uninitialized static storage is well-defined
as "all zeros". But NULL might not be all zeros. Do C++ compilers for such
platforms add extra initialization code to put NULL into unassigned static
pointers.
(BTW this is a language law question - not a style question. Write the
danged =NULL;).
--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!