summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/conversion/bitfield7.C
blob: 1080168dce19110451e927f89c0fd62034d39a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/33984
// { dg-do compile }

struct S
{
  unsigned int bar : 3;
} s;

int foo (unsigned int &);
int foo (double);

int
main ()
{
  return foo (s.bar);		// { dg-error "cannot bind bitfield" }
}