Giovanni Bajo wrote:
> 
> It looks like the general consensus is that we should not use fold() anymore
> in the frontends (I consider gimplify part of middle-end already, as it is
> mostly language-independent). I know Java people also are trying to remove
> usage of fold() since it produces simplifications which are not allowed in
> the Java semantics of constant expressions.

Not quite correct - *some* folding is still needed in Java:

http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5313

As Mark points out for C++, writing a java_fold() for these
ought to be simple and we can avoid calling fold() altogether
before semantic analysis has finished.

I know Tom would be very happy with this scheme. :-)

Ranjit.

-- 
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/

Reply via email to