gcc/testsuite/g++.old-deja/g++.jason/ambig3.C
raw| 1 | // { dg-do assemble } |
| 2 | // Testcase for ambiguity between function and variable declaration (8.2). |
| 3 | |
| 4 | struct A { |
| 5 | A (int, int); |
| 6 | int k; |
| 7 | }; |
| 8 | |
| 9 | void f () |
| 10 | { |
| 11 | int i[2], j; |
| 12 | A a (int (i[1]), j); // { dg-bogus "" } late parsing |
| 13 | A b (int (i[1]), int j); // function |
| 14 | a.k = 0; // { dg-bogus "" } late parsing |
| 15 | b (i, j); |
| 16 | } |