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: Convert (type *)&A into &A->field_of_type_and_offset_0.


Jan Hubicka wrote:

> I've regtested/bootstrapped this variant of patch.
> Looks like we don't do that while processing_template_decls.
> Does it seem OK?

Yes, though I would like to copy-edit your comment. :-)

> +      /* fold_build2 and fold_convert can not be used on frontend trees,
> +	 however this function is probably never used when processing template
> +	 decls when incomplette types are present.
> +
> +	 When folding is disabled, this function produce trees like
> +	 (type *)base + (type *)integer_cst that are left unfolded for quite
> +	 long time in optimization queue.  */

/* We use fold_build2 and fold_convert below to simplify the trees
provided to the optimizers.  It is not safe to call these functions when
processing a template because they do not handle C++-specific trees.  */

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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