From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18968 invoked by alias); 22 Nov 2005 02:31:49 -0000 Received: (qmail 18956 invoked by uid 48); 22 Nov 2005 02:31:46 -0000 Date: Tue, 22 Nov 2005 02:31:00 -0000 Subject: [Bug c++/24983] New: Needs a warning? X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "igodard at pacbell dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-11/txt/msg03068.txt.bz2 List-Id: 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