struct foo { const void f(); };
void foo::f(){}

gets you:

~/ootbc/members/src$ g++ foo.cc -Wall
foo.cc:2: error: prototype for `void foo::f()' does not match any in class
`foo'
foo.cc:1: error: candidate is: const void foo::f()
foo.cc:2: error: `void foo::f()' and `const void foo::f()' cannot be overloaded

Comeau gives a warning on the declaration and one error (not two) on the
definition.


-- 
           Summary: Needs a warning?
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24983

Reply via email to