This is the mail archive of the
mailing list for the GCC project.
Re: patch: handle vector constants in arrays
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 05 May 2003 13:25:09 -0700
- Subject: Re: patch: handle vector constants in arrays
- References: <E30416E9-7F35-11D7-9FCD-000393750C1E@redhat.com>
Aldy Hernandez <firstname.lastname@example.org> writes:
>> Could you explain how we get to this bit of digest_init with
>> inside_init not being a CONSTRUCTOR?
> if (TREE_CODE (value) == COMPOUND_LITERAL_EXPR
> && require_constant_value && !flag_isoc99 && pending)
> /* As an extension, allow initializing objects with static storage
> duration with compound literals (which are then treated just as
> the brace enclosed list they contain). */
> tree decl = COMPOUND_LITERAL_EXPR_DECL (value);
> value = DECL_INITIAL (decl);
> After the above code is executed, 'value' ends up being the VECTOR_CST
> that gets passed to digest_init().
Ah, okay. I just wanted to make sure that the VECTOR_CST could
legitimately appear at this point. Go ahead and check your patch in.