diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.mike/warn8.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.mike/warn8.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/warn8.C b/gcc/testsuite/g++.old-deja/g++.mike/warn8.C new file mode 100644 index 00000000000..3c61c8e0afb --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.mike/warn8.C @@ -0,0 +1,19 @@ +// Build don't link: + +struct foo { + bool test(); +}; +bool func(); + +void test() { + foo A; + bool (foo::* pmf)() = &foo::test; + bool (*pf)() = func; + + if (A.test) ; // WARNING - + if (func) ; // WARNING - + if (bool(A.test)) ; // WARNING - + if (bool(func)) ; + if (pmf) ; + if (pf) ; +} |