public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: jbuck@synopsys.com To: gcc-gnats@gcc.gnu.org Subject: c++/8279: REGRESSION: failure to find a matching function in ostream_iterator expansion Date: Fri, 18 Oct 2002 13:56:00 -0000 [thread overview] Message-ID: <20021018204713.28751.qmail@sources.redhat.com> (raw) >Number: 8279 >Category: c++ >Synopsis: REGRESSION: failure to find a matching function in ostream_iterator expansion >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Oct 18 13:56:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Joe Buck >Release: gcc-3.2 >Organization: >Environment: both linux (red hat 7.2) and solaris (sparc 2.7) >Description: The attached program compiles and runs correctly under gcc 2.95.2, but fails to compile under gcc 3.2 (including the release branch as of 17 Oct). The compiler complains that it cannot find a compatible operator<< while expanding the ostream_iterator template, even though an exact match is present. Defining HIDE_BUG reveals that the compiler is perfectly capable of finding the operator<< and using it when a loop, rather than std::copy to the ostream_iterator, is used >How-To-Repeat: Do gcc -c map_test.cpp for comparison, try gcc -c -DHIDE_BUG map_test.cpp >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="map_test.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="map_test.cpp" I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8YWxnb3JpdGht PgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDxtYXA+CiNpbmNsdWRlIDx2ZWN0b3I+Cgp0 eXBlZGVmIHN0ZDo6bWFwPHN0ZDo6c3RyaW5nLHVuc2lnbmVkPiBNYXB0eXBlOwp0eXBlZGVmIHN0 ZDo6cGFpcjxzdGQ6OnN0cmluZyx1bnNpZ25lZD4gUGFpcnR5cGU7CgpjbGFzcyBPcmRlcmluZyB7 CnB1YmxpYzoKICBib29sIG9wZXJh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sICJcbiIpKTsKI2VuZGlmCn0KCg==
next reply other threads:[~2002-10-18 20:56 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-10-18 13:56 jbuck [this message] 2002-10-19 3:58 paolo 2002-10-21 9:06 Wolfgang Bangerth 2002-10-21 9:36 Paolo Carlini 2002-10-22 11:01 jbuck
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=20021018204713.28751.qmail@sources.redhat.com \ --to=jbuck@synopsys.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).