This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/10200] Weird clash with same names in different scopes
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Feb 2016 19:23:10 +0000
- Subject: [Bug c++/10200] Weird clash with same names in different scopes
- Auto-submitted: auto-generated
- References: <bug-10200-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10200
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #31 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Another testcase which we just stumbled upon:
double exp(double);
#ifndef HIDE_NEW_OVERLOAD
template<typename T>
T exp(T t)
{
return ::exp((double)t);
}
#endif
template <typename> class A {
struct B { long exp; };
void m_fn1();
};
template <typename Key> void A<Key>::m_fn1() {
long insert_exp = 1;
B q;
(q->exp < insert_exp);
}