[cfe-commits] r59196 - in /cfe/trunk: lib/AST/Expr.cpp lib/AST/ExprConstant.cpp test/Sema/const-eval.c
eli.friedman at gmail.com
Wed Nov 12 17:19:47 PST 2008
On Wed, Nov 12, 2008 at 4:03 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> Author: ddunbar
> Date: Wed Nov 12 18:03:19 2008
> New Revision: 59196
> URL: http://llvm.org/viewvc/llvm-project?rev=59196&view=rev
> Fix bug in constant evaluation exposed by 176.gcc.
> - Evaluation of , operator used bogus assumption that LHS could be
> evaluated as an integral expression even though its type is
> This change is making isICE very permissive of the LHS in non-evaluated
> contexts because it is not clear what predicate we would use to reject
> code here. The standard didn't offer me any guidance; opinions?
Woah, this looks really strange.
One, you're committing a change to isICE without a test, which is
definitely a bad idea. What are you trying to accomplish there?
Second, this is somewhat tricky territory with tryEvaluate: we can
definitively calculate the value of a comma operator without it
actually being constant. I'm not sure how we want to deal with this
case, though: I think a lot of the code using tryEvaluate is ignoring
the possibility of side-effects.
More information about the cfe-commits