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: RFA: PATCH to initializer_constant_valid_p for c++/38880


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.

Yeah, I guess unless both operands are constants, you can get corner cases that will break, and reintroducing the POINTER_PLUS_EXPR fold just for two constant operands seems a bit silly.


Ian, do you still have reservations about my patch?

Jason


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