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]

Re: [C++ PATCH] Fix ICE in build_value_init (PR c++/51369)


On Wed, Dec 07, 2011 at 10:10:08AM -0500, Jason Merrill wrote:
> On 12/06/2011 02:48 PM, Jakub Jelinek wrote:
> >-  gcc_assert (!processing_template_decl || SCALAR_TYPE_P (type));
> >+  gcc_assert (!processing_template_decl
> >+	      || (SCALAR_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE));
> 
> How about SCALAR_TYPE_P (strip_array_types (type))?  OK with that change.

That would be readable, but expensive - SCALAR_TYPE_P evaluates
its argument 11 times.

	Jakub


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