This is the mail archive of the gcc@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: Great example of why "everything is a tree" sucks


> Other places where GENERIC provides something that no doubt seemed
> convenient originally, but is less useful when you want to ensure things
> are evaluated at exactly the time implied by language semantics, include
> SAVE_EXPRs and pre/post increment/decrement.

I'm a little skeptical here because Ada is second to no other languages (at 
least those supported by GCC) when it comes to precise rules of evaluation of 
expressions or elaboration of types; of course GENERIC knows nothing about of 
them and, precisely because of that, it's possible to support a significant 
range of semantics with it, including that of Ada.

> I'd be happy for front ends to move to doing all these things themselves,
> rather than trying to define GENERIC in a way that works for every
> language's requirements on when things are evaluated and when storage is
> allocated / deallocated.

I'm under the impression that the view is skewed here because the C family of 
compilers essentially build their ASTs in GENERIC, so they give it properties 
that it is not meant to have.  Instead it's a very flexible IL framework where 
you can express a lot of things, unlike GIMPLE which is much more narrow.

-- 
Eric Botcazou


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