[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"
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Nov 6 11:52:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list