public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jhr dot walter at t-online dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/12536] New: Regression regarding partial ordering Date: Wed, 08 Oct 2003 06:55:00 -0000 [thread overview] Message-ID: <20031008065459.12536.jhr.walter@t-online.de> (raw) PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12536 Summary: Regression regarding partial ordering Product: gcc Version: 3.3.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jhr dot walter at t-online dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu Hello, the following program ---------- #include <iostream> template<class T> struct some_type {}; template<typename A> some_type<A> foo(A const& a) { std::cout << "foo<A>" << std::endl; return some_type<A>(); } template<typename R, typename A> some_type<R> foo(A const& a) { std::cout << "foo<R,A>" << std::endl; return some_type<R>(); } template<typename A> some_type<A> bar(A const& a, A const& = A()) { std::cout << "bar<A>" << std::endl; return some_type<A>(); } template<typename R, typename A> some_type<R> bar(A const& a, R const& = R()) { std::cout << "bar<R,A>" << std::endl; return some_type<R>(); } int main() { foo<int>(0); bar<int>(0); } ---------- outputs ---------- foo<R,A> bar<A> ---------- when compiled with GCC 2.95.3 and ---------- foo<R,A> bar<R,A> ---------- when compiled with GCC 3.3.1. I believe GCC 2.95.3 is correct. Best, Joerg Walter P.S.: thanks to Patrick Kowalzick, Chris Theis and Graeme Prentice.
next reply other threads:[~2003-10-08 6:55 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-10-08 6:55 jhr dot walter at t-online dot de [this message] 2003-10-09 3:58 ` [Bug c++/12536] " pinskia at gcc dot gnu dot org 2003-10-13 7:01 ` jhr dot walter at t-online dot de 2003-10-13 8:05 ` nathan at gcc dot gnu dot org 2003-10-13 8:15 ` jhr dot walter at t-online dot de 2003-10-13 16:52 ` nathan at gcc dot gnu dot org 2003-10-15 8:26 ` jhr dot walter at t-online dot de 2003-10-30 23:40 ` bangerth at dealii dot org 2003-10-31 8:45 ` nathan at gcc dot gnu dot org 2003-10-31 17:30 ` nathan at gcc dot gnu dot org 2003-11-01 9:15 ` jhr dot walter at t-online dot de 2005-04-07 7:07 ` [Bug c++/12536] [DR 214/200] partial ordering bug pinskia at gcc dot gnu dot org 2005-05-10 13:30 ` nathan at gcc dot gnu dot org 2005-06-02 18:10 ` nathan at gcc dot gnu dot org
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=20031008065459.12536.jhr.walter@t-online.de \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).