This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24983] Needs a warning?
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2005 03:01:34 -0000
- Subject: [Bug c++/24983] Needs a warning?
- References: <bug-24983-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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