[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / conversion / bitfield10.C
blobf75504e0d9931a4d304f626d712b59403e5b86dc
1 // PR c++/38007
2 // We need to use the conversion function to the declared type of a bitfield,
3 // not the lowered bitfield type.
4 // { dg-do link }
6 struct A
8   operator unsigned int() { return 42; }
9   operator unsigned char();
12 struct B
14   unsigned int b : 8;
17 int
18 main ()
20   A u;
21   unsigned int v = u;
22   B w;
23   w.b = u;