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