This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: what is wrong here?
On Jul 3, 1999, "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de> wrote:
>> > namespace N {
>> > using ::f;
>> > class C {
>> > friend void f ();
>> > bug1.cc:8: `void N::f()' conflicts with previous using declaration `void f()'
>> Yup. In fact, I had met this bug while trying to find a work-around
>> for you, but I had forgotten to add it to the testsuite too. Thanks
>> for reminding me of that.
> Why is this a bug? I believe the error message is correct.
IMHO, the using declaration causes the name `f' to be found in N, so
the friend declaration shouldn't introduce a new declaration, just
bind to the one it finds.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists