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: Fix POINTER_PLUS_EXPR oversight


On Fri, Mar 2, 2012 at 6:59 PM, Mike Stump <mikestump@comcast.net> wrote:
> On Mar 2, 2012, at 1:33 AM, Richard Guenther wrote:
>>> Interestingly, the C++ frontend also has a pointer_diff function, but
>>> doesn't seem to attempt to optimize. Is there a reason for this?
>>
>> Frontends should not optimize when they are not required to.
>
> Actually, the frontends should optimize as long as it produces a faster compilation (and they are permitted to). ?You're thinking of the rule that proceeded this one, we switch away from many many years back.

Well, I think we should work towards the FEs preserving as much of the
AST that reflects the source program as possible.

Richard.


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