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: prevent creation of invalid static constructors from gimplifier


Olivier Hainque <hainque@adacore.com> writes:

>  I think I see what you meant now. Something like the change you suggested
>  to categorize_1 for the CONSTRUCTOR case only, plus categorize changed into
> 
>      HOST_WIDE_INT nc_elts = 0;
>      ...
>      categorize_ctor_elements_1 (ctor, p_nz_elts, &nc_elts, p_elt_count,
> 				 p_must_clear);
> 
>      ...
>      return nc_elts == 0 && TREE_CONSTANT (ctor);
> 
>  Is this better/correct understanding ?

Yes.  I also think that when you push it all the way, you'll find that
nc_elts drops out of categorize_ctor_elements_1.  But if it doesn't,
that's OK.

Ian


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