This is the mail archive of the gcc-patches@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]

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;
      }
  

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