This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50075] [C++0x] ICE related to parameter deduction and initializer_list


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50075

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-08-13
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-08-13 22:00:34 UTC ---
The problem is the recursion:

template <typename T>
auto make_array(const std::initializer_list<T> & il) ->
decltype(make_array(il))

You're declaring make_array to have the same return type as itself.  4.6
happily goes down the rabbit hole until it runs out of stack.  4.7 complains
and then crashes for another reason, which I will fix.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]