1 // Test that we don't have to deal with type punning
2 // DR 1188 says this is ill-formed
3 // { dg-do compile { target c++11 } }
8 unsigned char ca[sizeof(float)];
11 constexpr U u = { 1.0 };
12 constexpr float f = u.f;
13 constexpr unsigned char c = u.ca[0]; // { dg-error "U::ca" }
15 constexpr double d = 1.0;
16 constexpr unsigned char c2 = (unsigned char&)d; // { dg-error "char. glvalue" }