diff options
-rw-r--r-- | gcc/testsuite/g++.dg/mismatching-const.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/mismatching-const.C b/gcc/testsuite/g++.dg/mismatching-const.C new file mode 100644 index 00000000000..422860fb012 --- /dev/null +++ b/gcc/testsuite/g++.dg/mismatching-const.C @@ -0,0 +1,20 @@ +/* { dg-options "-Wmissing-noreturn -fdiagnostics-show-caret -fblt" } */ + +struct s1 +{ + void method_1 () const; +}; + +void s1::method_1 () +{ +} + + +struct s2 +{ + void method_2 (); +}; + +void s2::method_2 () const +{ +} |