This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: PATCH to initializer_constant_valid_p for c++/38880
On Fri, 20 Feb 2009, Richard Guenther wrote:
> On Thu, 19 Feb 2009, Jason Merrill wrote:
>
> > > > And to then wonder why
> > > > POINTER_PLUS_EXPR wasn't used instead of PLUS_EXPR.
> > >
> > > Because http://gcc.gnu.org/viewcvs?view=rev&revision=143442 made the
> > > compiler stop folding to POINTER_PLUS_EXPR.
> >
> > Do you two think it would make sense to put back that folding for the case of
> > PTR+small constant?
>
> I don't see how a small constant makes that folding more correct.
Btw, I think your patch to initializer_constant_valid_p is sound, but
I'll defer to Ian to approve it as he had issues with it.
Thanks,
Richard.