This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [applied] C++ patch to fix arrays of vectors
> > Please revise this to check for
> >
> > CLASS_TYPE_P (type) || TREE_CODE (type) == VECTOR_TYPE
> >
> > We shouldn't be going into that code for an array type.
>
> What about a compound literal of array type (is there such a thing)? If
> the CONSTRUCTOR has the right type, we've already massaged it
> appropriately. Though I suppose can_convert_arg would never return true,
> as it does array-to-pointer conversion on the arg before checking for type
> identity.
Right. That's why I don't think it makes sense to push ARRAY_TYPEs into
can_convert_arg -- it's just going to waste time.
If want to support compound literals of array type, we should probably
have a separate check for that in reshape_init.
My two cents,
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com