blob: b077e39751671d1e8c52a66071f4329cc4eae405 [file] [log] [blame]
#include <stdio.h>
struct Foobar{
static const double var;
};
const double Foobar::var = 1.0;
int main()
{
const char * ptr = (const char *)(&Foobar::var);
for (int i=0; i < 8; ++i){
if (i) fprintf(stderr, ".");
fprintf(stderr, "%.2x", 0xFF & ptr[i]);
}
fprintf(stderr, " => %g : %g\n", Foobar::var, *((double*)ptr));
return 0;
}