This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20637] New: [3.3/3.4/4.0/4.1 regression] Confusing message with different using declarations
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Mar 2005 16:27:10 -0000
- Subject: [Bug c++/20637] New: [3.3/3.4/4.0/4.1 regression] Confusing message with different using declarations
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This was hard to find. Consider this snippet:
------------------
struct B {
void f();
};
struct D : B {
using B::f;
B::f;
};
------------------
Note that D contains old- and new-style using declarations. In my case, they
were several hundred lines apart in D, so it wasn't quite so obvious. What
I get is this:
g/x> /home/bangerth/bin/gcc-4*/bin/c++ -c a.cc
a.cc:2: error: ?void B::f()? and ?void B::f()? cannot be overloaded
Note that it doesn't show where the attempt to overload happens, it only shows
the original place. That's bad diagnostics.
gcc2.95 didn't say anything about the code, so I rate this as a regression.
W.
--
Summary: [3.3/3.4/4.0/4.1 regression] Confusing message with
different using declarations
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20637