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: PATCH: Generalize tree-dumping infrastructure


Per Bothner wrote:-

> Yes,  when the C/C++ people implemented representing whole functions
> as trees they decided to add a whole slew of new tree types, instead of
> re-using the existing ones.  Thus where Java represents a conditional (if)
> statement the same way as it represents a conditional expression (using a
> COND_EXPR), C/C++ use the new IF_STMT.  I don't understand the
> reason for using the new tree nodes - it seems the wrong thing to do,
> since it needlessly duplicates code and functionality, unless there
> is some significant distinction.

I'm a fan of reducing the number of tree codes.  It just means more
cases to worry about, and more opportunities for bugs, particularly in
code like fold ().

Neil.


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