https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84820
Bug ID: 84820 Summary: [6/7/8 Regression] Bogus pointer-to-member accepted within template Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following invalid code snippet is wrongly accepted since GCC 4.9.0: ================================ struct A {}; template<int> struct B : A { B() { A(&A::foo); } }; B<0> b; ================================ Before, the code was correctly rejected: bug.cc: In constructor 'B<<anonymous> >::B()': bug.cc:7:14: error: invalid use of qualified-name 'A::foo' A(&A::foo); ^