This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: what is wrong here?


I guess this one is closely related:

void f ();

namespace N {

using ::f;

class C {
        friend void f ();
        int  m;
} c;

}

void
f () {
        N::c.m = 0;
}

> g++ bug1.cc

bug1.cc:8: `void N::f()' conflicts with previous using declaration `void
f()'
bug1.cc: In function `void f()':
bug1.cc:9: `int N::C::m' is private
bug1.cc:16: within this context


On 02 Jul 1999 01:37:08 -0300, you wrote:

>On Jul  1, 1999, dvv@dvv.ru (Dima Volodin) wrote:
>
>> namespace N {
>> class C {
>>         friend void ::f ();
>
>> bug.cc:4: parse error before `('
>
>Thanks for your bug report.  I'm installing a simplified version of
>your testcase in the testsuite.
>
>-- 
>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
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]