However, the global has been given a zero initializer which makes doing this change difficult without more analysis than I think is necessary.
So, finally, my question is, can we put an undef initializer on this variable instead of a zero initializer? I don't know the C++ spec so i'm not sure if i'm missing something.
However, the global has been given a zero initializer which makes doing this change difficult without more analysis than I think is necessary.
So, finally, my question is, can we put an undef initializer on this variable instead of a zero initializer? I don't know the C++ spec so i'm not sure if i'm missing something.
No; see [stmt.dcl]p4.
D'oh. More involved analysis it is then. Thanks Eli.