diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/cv_func2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/cv_func2.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/cv_func2.C b/gcc/testsuite/g++.dg/other/cv_func2.C new file mode 100644 index 000000000..ffd249fc8 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/cv_func2.C @@ -0,0 +1,18 @@ +typedef int ptr1() const; // no error + +void foo () +{ + typedef int ptr2() const; // no error +} + +class C +{ + typedef int ptr3() const; // error + + void bar () + { + typedef int ptr4() const; // no error + } +}; + +void wibble () const { } // { dg-error "non-member function" } |