[Bug c++/61174] New: [4.9 Regression] Bad resolving of specialized template with const-qualified member function

2014-05-13 Thread nco...@aldebaran-robotics.com
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=32788action=edit
A file reproducing the bug

With 4.8 it compiles.

With 4.9.0 we got:
main.cpp: In instantiation of ‘struct Aint (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
   AT a;
^

Because it use the attribute specialization of our template.

[Bug c++/61174] Bad resolving of specialized template with const-qualified member function

2014-05-13 Thread nco...@aldebaran-robotics.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61174

--- Comment #3 from alkino nco...@aldebaran-robotics.com ---
It works with ideone (gcc-4.8.1) https://ideone.com/t8Jww2


[Bug c++/61174] Bad resolving of specialized template with const-qualified member function

2014-05-13 Thread nco...@aldebaran-robotics.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61174

--- Comment #5 from alkino nco...@aldebaran-robotics.com ---
Can you tell me why, please?

Thanks to look at it.


[Bug c++/61174] Bad resolving of specialized template with const-qualified member function

2014-05-13 Thread nco...@aldebaran-robotics.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61174

--- Comment #7 from alkino nco...@aldebaran-robotics.com ---
I only spot the wrong bug. Here it is: 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61182