repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
conversion
/
bitfield10.C
blob
f75504e0d9931a4d304f626d712b59403e5b86dc
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 }
5
6
struct A
7
{
8
operator unsigned int() { return 42; }
9
operator unsigned char();
10
};
11
12
struct B
13
{
14
unsigned int b : 8;
15
};
16
17
int
18
main ()
19
{
20
A u;
21
unsigned int v = u;
22
B w;
23
w.b = u;
24
}