* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-union.C
blob0c3548c0ac463801569d85fcbdcd7d01d9816037
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 } }
5 union U
7   float f;
8   unsigned char ca[sizeof(float)];
9 };
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" }