public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: paolo@gcc.gnu.org To: brister@pobox.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, ljrittle@gcc.gnu.org, nobody@gcc.gnu.org Subject: Re: libstdc++/8231: iostream header position causes bad code generation Date: Sat, 02 Nov 2002 13:43:00 -0000 [thread overview] Message-ID: <20021102214330.17572.qmail@sources.redhat.com> (raw) Synopsis: iostream header position causes bad code generation Responsible-Changed-From-To: unassigned->ljrittle Responsible-Changed-By: paolo Responsible-Changed-When: Sat Nov 2 13:43:29 2002 Responsible-Changed-Why: Loren, could you please have a look at this PR, which, if still an issue with current mainline and 3_2, seems definitely target specific? Thanks, Paolo. State-Changed-From-To: feedback->analyzed State-Changed-By: paolo State-Changed-When: Sat Nov 2 13:43:29 2002 State-Changed-Why: Of course my first tests on i686-pc-linux-gnu from freebsd4.6 preprocessed source are completely meaningless :-( Sorry. Anyway, this is the source I have: // ---------------------------------- //#include <iostream> // *1* class A { public: A(const char *addr); std::ostream &print(std::ostream &ostr) const; private: long address; }; //#include <iostream> // *2* std::ostream &operator<<(std::ostream &ostr, const A &addr) { return addr.print(ostr); } //#include <iostream> // *3* std::ostream &A::print(std::ostream &ostr) const { return ostr << "OK"; } //#include <iostream> // *4* A::A(const char *) { address = 0xa000001; } //#include <iostream> // *5* int main(int argc, char **argv) { A a1("x"); std::cout << "result: " << a1 << std::endl; } // ------------------------------------- With current mainline and 3_2-branch on i686-pc-linux-gnu only including in // *1* leads to a succesfull compilation. In that case the run-time behaviour is Ok. paolo:~/Gcc/PRs/v3/Analyzed> a.out result: OK http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8231
next reply other threads:[~2002-11-02 21:43 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-11-02 13:43 paolo [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-11-04 14:32 ljrittle 2002-11-02 13:16 brister 2002-11-02 12:48 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=20021102214330.17572.qmail@sources.redhat.com \ --to=paolo@gcc.gnu.org \ --cc=brister@pobox.com \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=ljrittle@gcc.gnu.org \ --cc=nobody@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).