This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/10200] Weird clash with same names in different scopes


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);
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]