[PATCH] eliminate calls to build_constructor_from_list in ObjC FE

IainS developer@sandoe-acoustics.co.uk
Tue May 25 17:00:00 GMT 2010


On 25 May 2010, at 16:36, Nathan Froyd wrote:

> On Tue, May 25, 2010 at 04:27:59PM +0100, IainS wrote:
>> /GCC/gcc-live-trunk/gcc/objc/objc-act.c:2089:8: error: passing  
>> argument 1
>> of ‘tree_check_failed’ from incompatible pointer type [-Werror]
>> /GCC/gcc-live-trunk/gcc/tree.h:879:13: note: expected ‘const_tree’  
>> but
>> argument is of type ‘struct VEC_constructor_elt_gc * const’
>> /GCC/gcc-live-trunk/gcc/objc/objc-act.c:2089:8: error:
>> ‘VEC_constructor_elt_gc’ has no member named ‘list’
>> cc1: all warnings being treated as errors
>
> Pffft, weren't we getting rid of ObjC++ anyway? :)

;-) .. reports of its death might be exaggerated (one can never be  
sure)  ...

> IIUC the code correctly, something like:
>
>  if (!VEC_index (constructor_elt, elts, 0)->index)
>    TREE_TYPE (constructor) = init_list_type_node;
>
> should work--at least to fix the compilation problem.

yes, indeed it does, and AFAICT no regressions on *-apple-darwin9 (not  
tried on darwin10 yet).

could you commit that change as fix?

cheers,
Iain



More information about the Gcc-patches mailing list