diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/conv4.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/conv4.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/conv4.C b/gcc/testsuite/g++.old-deja/g++.other/conv4.C new file mode 100644 index 000000000..c195e41d6 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/conv4.C @@ -0,0 +1,18 @@ +// { dg-do run } +// Testcase for proper hiding of base conversion ops. + +struct A +{ + operator const char *(); +}; + +struct B : public A +{ + operator const char *() { return 0; } +}; + +int main( void ) +{ + B b; + const char *p = b; +} |