| 1 |
// PR c++/92215 - flawed diagnostic for bit-field with non-integral type. |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
struct S { |
| 5 |
int *f1 : 3; // { dg-error "bit-field .f1. has non-integral type .int\\*." } |
| 6 |
int &f2 : 3; // { dg-error "bit-field .f2. has non-integral type .int&." } |
| 7 |
int &&f3 : 3; // { dg-error "bit-field .f3. has non-integral type .int&&." } |
| 8 |
int f4[1] : 3; // { dg-error "bit-field .f4. has non-integral type .int \\\[1\\\]." } |
| 9 |
int *f5 __attribute__((deprecated)) : 3; // { dg-error "bit-field .f5. has non-integral type .int\\*." } |
| 10 |
int f6[1] __attribute__((deprecated)) : 3; // { dg-error "bit-field .f6. has non-integral type .int \\\[1\\\]." } |
| 11 |
int &f7 __attribute__((deprecated)): 3; // { dg-error "bit-field .f7. has non-integral type .int&." } |
| 12 |
int ****: 3; // { dg-error "expected" } |
| 13 |
int *f9[1] : 3; // { dg-error "bit-field .f9. has non-integral type .int\\* \\\[1\\\]." } |
| 14 |
int (*f10)() : 3; // { dg-error "bit-field .f10. has non-integral type .int \\(\\*\\)\\(\\)." } |
| 15 |
int [][2] : 3; // { dg-error "expected" } |
| 16 |
}; |