diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.gb/sig15.C')
-rwxr-xr-x | gcc_arm/testsuite/g++.old-deja/g++.gb/sig15.C | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.gb/sig15.C b/gcc_arm/testsuite/g++.old-deja/g++.gb/sig15.C new file mode 100755 index 0000000..f0ae52e --- /dev/null +++ b/gcc_arm/testsuite/g++.old-deja/g++.gb/sig15.C @@ -0,0 +1,35 @@ +// Special g++ Options: -fhandle-signatures +// GROUPS passed gb sigptr cast +// Test casting a signature pointer to a class pointer. + +extern "C" +{ + int printf (char *, ...); +} + +class C +{ +public: + char * f (void) { return "PA"; } + char * g (int) { return "SS"; } +}; + +signature S +{ + char * f (void); + char * g (int); +}; + +int main (void) +{ + C a; + S * p; + C * q; + + p = &a; + q = (C *) p; + + printf ("%s%s\n", q->f (), q->g (0)); + + return 0; +} |