LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / bitfld-22.c
blob2fb904bce245e75ff8e81f7d6f533a5376c283c8
1 /* PR c/70671 */
2 /* { dg-do compile } */
4 extern void bar (int *);
6 struct S
8 int x:2;
9 } s, *r;
11 void
12 foo (void)
14 int *p1 = &s.x; /* { dg-error "13:cannot take address of bit-field 'x'" } */
15 int *p2;
16 p2 = &s.x; /* { dg-error "8:cannot take address of bit-field 'x'" } */
17 bar (&s.x); /* { dg-error "8:cannot take address of bit-field 'x'" } */