Some relevant verbiage from C++ Standard:
3.6.2 Initialization of non-local objects [basic.start.init]
1 The storage for objects with static storage duration
(basic.stc.static) shall be zero-initialized (dcl.init) before any
other initialization takes place. Objects of POD types
(basic.types) with static storage duration initialized with constant
expressions (expr.const) shall be initialized before any dynamic
initialization takes place. Objects of namespace scope with static
storage duration defined in the same translation unit and dynamically
initialized shall be initialized in the order in which their defini-
tion appears in the translation unit. [Note: dcl.init.aggr
describes the order in which aggregate members are initialized. The
initialization of local static objects is described in stmt.dcl. ]
6.7 Declaration statement [stmt.dcl]
<...snip...>
4 The zero-initialization (dcl.init) of all local objects with static
storage duration (basic.stc.static) is performed before any other
initialization takes place. A local object of POD type
(basic.types) with static storage duration initialized with con-
stant-expressions is initialized before its block is first entered. An
implementation is permitted to perform early initialization of other
local objects with static storage duration under the same conditions
that an implementation is permitted to statically initialize an object
with static storage duration in namespace scope (basic.start.init).
Otherwise such an object is initialized the first time control passes
through its declaration; such an object is considered initialized upon
the completion of its initialization. If the initialization exits by
throwing an exception, the initialization is not complete, so it will
be tried again the next time control enters the declaration. If con-
trol re-enters the declaration (recursively) while the object is being
initialized, the behavior is undefined. [Example:
int foo(int i)
{
static int s = foo(2*i); // recursive call - undefined
return i+1;
}
--end example]
2) The transfer from the condition of a switch statement to a case la-
bel is considered a jump in this respect.
5 The destructor for a local object with static storage duration will be
executed if and only if the variable was constructed. [Note:
basic.start.term describes the order in which local objects with
static storage duration are destroyed. ]