Language-specific tree nodes

Per Bothner per@bothner.com
Tue Jan 2 09:58:00 GMT 2001


Peter Gerwinski <peter@gerwinski.de> writes:

> While `**' takes arbitrary numeric operands (including Complex),
> `pow' is only legal with an integer exponent.

They could still both use EXPON_EXPR, unless they return different
results for integer exponents.  (I realise that you do need to be
able to distinguish them if type-checking is done after tree building.)

> > Maybe both can be special cases of EXPON_EXPR.
> 
> They can, but they must be flagged. I already have no
> DECL_FOO_FLAG_42() left.

The flags can be overloaded.  If you don't already have this,
I recommentd a comment like at the start of gcc/cp/cp-tree.h
that shows how each flag bit is used, specifically the interpretation
of each bit for a given tree code.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/


More information about the Gcc mailing list