public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: schnoerr@mailzone.com To: gcc-gnats@gcc.gnu.org Subject: c++/8163: call of template code is rejected as private in this context Date: Mon, 07 Oct 2002 09:56:00 -0000 [thread overview] Message-ID: <20021007165242.2022.qmail@sources.redhat.com> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2692 bytes --] >Number: 8163 >Category: c++ >Synopsis: call of template code is rejected as private in this context >Confidential: no >Severity: serious >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Mon Oct 07 09:56:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Claudius Schnörr >Release: gcc version 3.2 20020818 (prerelease) >Organization: >Environment: Configured with: /netrel/src/gcc-3.2-1/configure --enable-languages=c,c++,f77,ja va --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --with out-included-gettext --enable-interpreter --disable-sjlj-exceptions --disable-ve rsion-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-pc -cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecd ir=/usr/sbin Thread model: posix gcc version 3.2 20020818 (prerelease) >Description: A method Test<Type,1>::testfkt() is called. Therein, a method Test<Type,2>::dat_embrace( Test<Type,1> & ) of a local Test<Type,2>-objekt is called, which is rejected as being private to TopObj<Type,1>. This is true but in this case, a local TopObj<Type,2> calls it, which should be allowed to call it. I think this is incorrect, but I'm not sure. The error message: g++ test.cc -o test -Wall test.cc: In member function `Test<Rank>& Test<Rank>::testfkt() [with short int Rank = 1]': test.cc:24: instantiated from here test.cc:13: `void Test<Rank>::dat_embrace(Test<LowRank>&) [with short int LowRank = 1, short int Rank = 2]' is private test.cc:19: within this context >How-To-Repeat: >Fix: Work around: make corresponding methods public: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="test.cc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.cc" dGVtcGxhdGUgPHNob3J0IFJhbms+CmNsYXNzIFRlc3QgewpwdWJsaWM6CiAgICBUZXN0KCkge30K CiAgICBUZXN0PFJhbms+ICYgdGVzdGZrdCgpOwpwcml2YXRlOgogICAgdGVtcGxhdGUgPHNob3J0 IExvd1Jhbms+CiAgICBpbmxpbmUgdm9pZCBkYXRfZW1icmFjZSggVGVzdDxMb3dSYW5rPiAmIGRh ZCApOwp9OwoKdGVtcGxhdGUgPHNob3J0IFJhbms+IHRlbXBsYXRlIDxzaG9ydCBMb3dSYW5rPgp2 b2lkIFRlc3Q8UmFuaz46OmRhdF9lbWJyYWNlKCBUZXN0PExvd1Jhbms+ICYgdHR0ICkge30KCnRl bXBsYXRlIDxzaG9ydCBSYW5rPgpUZXN0PFJhbms+ICYgVGVzdDxSYW5rPjo6dGVzdGZrdCgpIHsK ICAgIFRlc3Q8Mj4gdG8yID0gVGVzdDwyPigpOwogICAgVGVzdDwxPiB0bzEgPSBUZXN0PDE+KCk7 CiAgICB0bzIuZGF0X2VtYnJhY2UoIHRvMSApOwp9CgppbnQgbWFpbiAoKSB7CiAgICBUZXN0PDE+ IHR0dCA9IFRlc3Q8MT4oKTsKICAgIHR0dC50ZXN0Zmt0KCk7Cn0K
next reply other threads:[~2002-10-07 16:56 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-10-07 9:56 schnoerr [this message] 2002-10-24 7:28 lerdsuwa
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20021007165242.2022.qmail@sources.redhat.com \ --to=schnoerr@mailzone.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).