[cfe-dev] [PATCH] add constant expression evaluation to the AST and fix PR2413
Argiris Kirtzidis
akyrtzi at gmail.com
Sat Jun 14 13:32:21 PDT 2008
Argiris Kirtzidis wrote:
>
> if (expr is integer)
> ..
> else if (expr is float)
> ...
Just to be more clear about this, your design with TryEvaluateExprInt,
TryEvaluateExprFloat is not the same as the above; these functions work
more like
if (expr can be evaluated as integer)
..
else if (expr can be evaluated as float)
..
This way, for example, you cannot distinguish between an integer
constant and a character one.
-Argiris
More information about the cfe-dev
mailing list