https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86249
Bug ID: 86249 Summary: declaration conflicts with target of using declaration already in scope Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhonghao at pku dot org.cn Target Milestone: --- The code is as follow: namespace Name { template <class T> class Point; } using Name::Point; template <class T> class Point { public: Point() {} protected: T member; }; int main(void) { Name::Point<double> d; return(0); } clang++ rejects the code with error messages: error: declaration conflicts with target of using declaration already in scope template <class T> class Point { error: implicit instantiation of undefined template 'Name::Point<double>' Name::Point<double> d; g++ accepts the code. The code comes from a gcc bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1876 I thought that it is a clang++ bug, and reported it to https://bugs.llvm.org/show_bug.cgi?id=37867 Richard Smith determined that this is a gcc bug. Shall gcc repair the bug, if it is?