gcc/testsuite/g++.old-deja/g++.brendan/parse4.C
raw| 1 | // { dg-do assemble } |
| 2 | |
| 3 | class B |
| 4 | { |
| 5 | public: |
| 6 | B( int t ) {} |
| 7 | void f() {} |
| 8 | }; |
| 9 | |
| 10 | int g() { return 0; } // referenced below |
| 11 | |
| 12 | int main() |
| 13 | { |
| 14 | int try1; |
| 15 | B( try1 ).f(); // no syntax error |
| 16 | B b( g() ); // no syntax error |
| 17 | B( ::g() ).f(); // no syntax error |
| 18 | B( g() ).f(); // no syntax error |
| 19 | } |