From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7174 invoked by alias); 22 Nov 2005 03:01:37 -0000 Received: (qmail 7153 invoked by uid 48); 22 Nov 2005 03:01:34 -0000 Date: Tue, 22 Nov 2005 03:01:00 -0000 Message-ID: <20051122030134.7152.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/24983] Needs a warning? In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" 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/msg03071.txt.bz2 List-Id: ------- Comment #2 from pinskia at gcc dot gnu dot org 2005-11-22 03:01 ------- Different versions give different diagnostics: earth:~>gcc t.cc t.cc:2: error: prototype for 'void foo::f()' does not match any in class 'foo' t.cc:1: error: candidate is: const void foo::f() t.cc:2: error: 'void foo::f()' cannot be overloaded t.cc:1: error: with 'const void foo::f()' earth:~>~/ia32_linux_gcc3_4/bin/gcc t.cc t.cc:2: error: prototype for `void foo::f()' does not match any in class `foo' t.cc:1: error: candidate is: const void foo::f() t.cc:2: error: `void foo::f()' and `const void foo::f()' cannot be overloaded earth:~>~/ia32_linux_gcc3_3/bin/gcc t.cc t.cc:2: error: prototype for `void foo::f()' does not match any in class `foo' t.cc:1: error: candidate is: const void foo::f() t.cc:2: error: `void foo::f()' and `const void foo::f()' cannot be overloaded earth:~>~/ia32_linux_gcc3_2/bin/gcc t.cc t.cc:2: prototype for `void foo::f()' does not match any in class `foo' t.cc:1: candidate is: const void foo::f() t.cc:2: `void foo::f()' and `const void foo::f()' cannot be overloaded earth:~>~/ia32_linux_gcc3_0/bin/gcc t.cc t.cc:2: prototype for `void foo::f()' does not match any in class `foo' t.cc:1: candidate is: const void foo::f() earth:~>~/ia32_linux_gcc2_95//bin/gcc t.cc t.cc:2: new declaration `void foo::f()' t.cc:1: ambiguates old declaration `const void foo::f()' I say that 3.0.x is the best if it is what we should say then we have a regression. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24983