public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: gawrilow@math.tu-berlin.de To: gcc-gnats@gcc.gnu.org Subject: c++/4653: template instantiation not in sync with Koenig's lookup Date: Thu, 25 Oct 2001 16:27:00 -0000 [thread overview] Message-ID: <20011023113110.32517.qmail@sourceware.cygnus.com> (raw) >Number: 4653 >Category: c++ >Synopsis: template instantiation not in sync with Koenig's lookup >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu Oct 25 16:26:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Ewgenij Gawrilow >Release: 3.0.1 >Organization: >Environment: Solaris 8 @ UltraSPARC; Linux @ i686 >Description: If the point of instantiation of a class template coincides with a call to a function which can be found only via Koenig's lookup, and the latter can succeed only if the instantiation is already done (since the base class of the class template is involved,) then the lookup fails. The instantiation is done, nevertheless, since the similar calls later on in the code produce no diagnostic! I think, this case deserves special treatment, in that Koenig's lookup should be done after the instantiation, whereas the usual one can happen before. >How-To-Repeat: Compile the attached code sample. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="koenig.cc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="koenig.cc" bmFtZXNwYWNlIEEgewogICBjbGFzcyByb290IHsgfTsKCiAgIHRlbXBsYXRlIDxjbGFzcyBYLCBj bGFzcyBZPgogICBib29sIG9wZXJhdG9yPT0gKGNvbnN0IFgmLCBjb25zdCBZJikgewogICAgICBy ZXR1cm4gdHJ1ZTsKICAgfQoKICAgdGVtcGxhdGUgPGNsYXNzIFgsIGNsYXNzIFk+CiAgIGJvb2wg b3BlcmF0b3IhPSAoY29uc3QgWCYsIGNvbnN0IFkmKSB7CiAgICAgIHJldHVybiBmYWxzZTsKICAg fQp9OwoKdGVtcGxhdGUgPGNsYXNzIFQ+CmNsYXNzIEIgOiBwdWJsaWMgQTo6cm9vdCB7IH07Cgpi b29sIGZvbyhjb25zdCBCPGludD4mIGIxLCBjb25zdCBCPGNoYXI+JiBiMikgewogICBib29sIHg9 IGIxPT1iMjsKICAgYm9vbCB5PSBiMSE9YjI7CiAgIGJvb2wgej0gYjI9PWIxOwogICByZXR1cm4g eCB8fCB5IHx8IHo7Cn0K
next reply other threads:[~2001-10-25 16:27 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-10-25 16:27 gawrilow [this message] 2001-12-31 8:02 nathan 2002-12-26 10:09 nathan
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=20011023113110.32517.qmail@sourceware.cygnus.com \ --to=gawrilow@math.tu-berlin.de \ --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).