This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50075] [C++0x] ICE related to parameter deduction and initializer_list
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 13 Aug 2011 22:00:34 +0000
- Subject: [Bug c++/50075] [C++0x] ICE related to parameter deduction and initializer_list
- Auto-submitted: auto-generated
- References: <bug-50075-4@http.gcc.gnu.org/bugzilla/>
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.