https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61174
Bug ID: 61174 Summary: [4.9 Regression] Bad resolving of specialized template with const-qualified member function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nco...@aldebaran-robotics.com Created attachment 32788 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32788&action=edit A file reproducing the bug With 4.8 it compiles. With 4.9.0 we got: main.cpp: In instantiation of ‘struct A<int (C::*)() const>’: main.cpp:22:8: required from ‘void make(T) [with T = int (C::*)() const]’ main.cpp:27:13: required from here main.cpp:6:18: attention : invalid application of ‘sizeof’ to a function type [-Wpointer-arith] int fail[sizeof(T) - 1000]; ^ main.cpp: In function ‘void make(T) [with T = int (C::*)() const]’: main.cpp:22:8: erreur: size of variable ‘a’ is too large A<T> a; ^ Because it use the attribute specialization of our template.