public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: comer@mailru.com To: gcc-gnats@gcc.gnu.org Subject: c++/7397: GCC doesn't compile the correct code Date: Wed, 24 Jul 2002 12:56:00 -0000 [thread overview] Message-ID: <20020724195112.7952.qmail@sources.redhat.com> (raw) >Number: 7397 >Category: c++ >Synopsis: GCC doesn't compile the correct code >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Jul 24 12:56:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Sergey Shandar >Release: 2.95.3-5 (cygwin special) >Organization: >Environment: Windows 2000 >Description: ns_tmp.cpp: In function `void F<int>(int)': ns_tmp.cpp:15: instantiated from here ns_tmp.cpp:10: `AF' undeclared (first use this function) ns_tmp.cpp:10: (Each undeclared identifier is reported only once ns_tmp.cpp:10: for each function it appears in.) >How-To-Repeat: namespace A { template<class T> void AF(T x) { } }; template<class T> void F(T x) { using namespace A; AF(x); } int main(void) { F(3); return 0; } >Fix: namespace A { template<class T> void AF(T x) { } }; template<class T> void F(T x) { using namespace A; A::AF(x); } int main(void) { F(3); return 0; } >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="ns_tmp.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ns_tmp.cpp" bmFtZXNwYWNlIEENCnsNCgl0ZW1wbGF0ZTxjbGFzcyBUPiB2b2lkIEFGKFQgeCkgeyB9DQp9Ow0K DQp0ZW1wbGF0ZTxjbGFzcyBUPiB2b2lkIEYoVCB4KQ0Kew0KCXVzaW5nIG5hbWVzcGFjZSBBOw0K DQoJQUYoeCk7DQp9DQoNCmludCBtYWluKHZvaWQpDQp7DQoJRigzKTsNCglyZXR1cm4gMDsNCn0N Cg0KLyoNCmdjYyB2ZXJzaW9uIDIuOTUuMy01IChjeWd3aW4gc3BlY2lhbCkNCg0KZ2NjIG5zX3Rt cC5jcHANCg0KbnNfdG1wLmNwcDogSW4gZnVuY3Rpb24gYHZvaWQgRjxpbnQ+KGludCknOg0KbnNf dG1wLmNwcDoxNTogICBpbnN0YW50aWF0ZWQgZnJvbSBoZXJlDQpuc190bXAuY3BwOjEwOiBgQUYn IHVuZGVjbGFyZWQgKGZpcnN0IHVzZSB0aGlzIGZ1bmN0aW9uKQ0KbnNfdG1wLmNwcDoxMDogKEVh Y2ggdW5kZWNsYXJlZCBpZGVudGlmaWVyIGlzIHJlcG9ydGVkIG9ubHkgb25jZQ0KbnNfdG1wLmNw cDoxMDogZm9yIGVhY2ggZnVuY3Rpb24gaXQgYXBwZWFycyBpbi4pDQoqLw==
next reply other threads:[~2002-07-24 19:56 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-07-24 12:56 comer [this message] 2002-07-25 4:45 paolo
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=20020724195112.7952.qmail@sources.redhat.com \ --to=comer@mailru.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).