gcc/testsuite/g++.old-deja/g++.bob/incomplete-cast1.C
raw| 1 | // { dg-do assemble } |
| 2 | // prms-id: 5274 |
| 3 | class VHDLIdentifier; |
| 4 | |
| 5 | class VHDLPackageProtoRep { |
| 6 | public: |
| 7 | int thing(); |
| 8 | private: |
| 9 | virtual VHDLIdentifier &actual_name() ; |
| 10 | }; |
| 11 | extern void form(const char *format, ... ); |
| 12 | int |
| 13 | VHDLPackageProtoRep::thing() |
| 14 | { |
| 15 | form("package `%s'", (char *)actual_name()); // { dg-error "" } can't convert from incomplete type |
| 16 | return 0; |
| 17 | } |