public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/38030] [4.2/4.3/4.4 Regression] g++ template with overloaded function behave differently on "g++ 4.3.2" and "g++ 3.4.6"
Date: Thu, 06 Nov 2008 11:52:00 -0000	[thread overview]
Message-ID: <20081106115113.17142.qmail@sourceware.org> (raw)
In-Reply-To: <bug-38030-16102@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-11-06 11:51 -------
Confirmed.  For the following neither f_ nor d_ are dependent and should be
bound to f_ (B_ &) during first-stage name-lookup.  For some reason this
doesn't work - it does if d_ is of type B_ though.

extern "C" void abort ();
struct B_ { };
struct D_:public B_ { };
D_ d_;
void f_ (B_ &) { }
template < class T >
void g_ (T t)
{
  f_ (d_);
}
void f_ (D_ &) { abort (); }
int main (int argc, char *argv[])
{
  D_ d;
  g_ (d);
  return 0;
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
      Known to fail|                            |3.3.6 4.1.2 4.3.2
      Known to work|                            |3.4.6
   Last reconfirmed|0000-00-00 00:00:00         |2008-11-06 11:51:12
               date|                            |
            Summary|g++ template with overloaded|[4.2/4.3/4.4 Regression] g++
                   |function behave differently |template with overloaded
                   |on "g++ 4.3.2" and "g++     |function behave differently
                   |3.4.6"                      |on "g++ 4.3.2" and "g++
                   |                            |3.4.6"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38030


  reply	other threads:[~2008-11-06 11:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 10:25 [Bug c++/38030] New: " ashutosh dot nema at nechclst dot in
2008-11-06 11:52 ` rguenth at gcc dot gnu dot org [this message]
2008-11-06 11:54 ` [Bug c++/38030] [4.2/4.3/4.4 Regression] name-lookup for non-dependent name in template function is wrong rguenth at gcc dot gnu dot org
2008-11-06 12:09 ` rguenth at gcc dot gnu dot org
2008-11-06 12:56 ` rguenth at gcc dot gnu dot org
2008-11-06 12:56 ` jakub at gcc dot gnu dot org
2008-11-14 18:31 ` jason at gcc dot gnu dot org
2008-11-14 22:00 ` jason at gcc dot gnu dot org
2008-11-14 22:04 ` [Bug c++/38030] [4.2/4.3 " jason at gcc dot gnu dot org
2008-11-14 23:08 ` jason at gcc dot gnu dot org
2008-11-14 23:17 ` jason at gcc dot gnu dot org
2008-11-14 23:29 ` rguenther at suse dot de
2009-03-24  5:14 ` pinskia at gcc dot gnu dot org
2009-03-31 15:43 ` jason at gcc dot gnu dot org
2009-04-02 18:38 ` jason at gcc dot gnu dot org
2009-04-03 18:05 ` jason 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=20081106115113.17142.qmail@sourceware.org \
    --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: link
Be 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).