This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH for c++/37288 (auto ice on invalid)
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 30 Aug 2008 19:12:21 -0400
- Subject: C++ PATCH for c++/37288 (auto ice on invalid)
Another place that needed to not die when faced with auto.
Tested x86_64-pc-linux-gnu, applied to trunk.
2008-08-30 Jason Merrill <jason@redhat.com>
PR c++/37288
* pt.c (dependent_type_p): Don't abort on auto outside of a template.
Index: pt.c
===================================================================
*** pt.c (revision 139798)
--- pt.c (working copy)
*************** dependent_type_p (tree type)
*** 15892,15898 ****
/* If we are not processing a template, then nobody should be
providing us with a dependent type. */
gcc_assert (type);
! gcc_assert (TREE_CODE (type) != TEMPLATE_TYPE_PARM);
return false;
}
--- 15892,15898 ----
/* If we are not processing a template, then nobody should be
providing us with a dependent type. */
gcc_assert (type);
! gcc_assert (TREE_CODE (type) != TEMPLATE_TYPE_PARM || is_auto (type));
return false;
}