This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61174] New: [4.9 Regression] Bad resolving of specialized template with const-qualified member function
- From: "ncornu at aldebaran-robotics dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 May 2014 13:14:07 +0000
- Subject: [Bug c++/61174] New: [4.9 Regression] Bad resolving of specialized template with const-qualified member function
- Auto-submitted: auto-generated
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: ncornu@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.