gcc/testsuite/g++.dg/diagnostic/array-init1.C
raw| 1 | // PR c++/93710 - poor diagnostic for array initializer. |
| 2 | |
| 3 | struct A { A (int); A (char*); int i; }; |
| 4 | |
| 5 | int x; |
| 6 | |
| 7 | A a1[] = { |
| 8 | 0L, // { dg-error "3:conversion from .long int. to .A. is ambiguous" } |
| 9 | &x, // { dg-error "3:invalid conversion from .int\\*. to .int." } |
| 10 | __builtin_offsetof (A, i) // { dg-error "23:conversion from .\(long \)?unsigned int. to .A. is ambiguous" } |
| 11 | }; |