All bits zero doesn't necessarily represent double 0.0, though it does
on all common architectures.
There might be some wiggle room in the standard to allow compilers for
these unusual platforms to not initalise static doubles to zero.
Nope. The standard doesn't say anything about static objects being
initialized to all bits zero.
C99 6.7.8 paragraph 10 says,
If an object that has static storage duration is not initialized
explicitly, then:
- if it has pointer type, it is initialized to a null pointer;
- if it has arithmetic type, it is initialized to
(positive or unsigned) zero;
- if it is an aggregate, every member is initialized
(recursively) according to these rules;
The last clause I've quoted covers the case of arrays and their members,
and the clause before it covers the case of doubles. Implementations for
platforms where floating-point zero, or null pointers, are not all-bits
zero may have to do some extra work to properly initialize pointers and
doubles.