[cfe-commits] r53174 - in /cfe/trunk: lib/AST/Expr.cpp lib/Sema/SemaDecl.cpp test/Sema/compound-literal.c
neil at daikokuya.co.uk
Mon Jul 7 15:01:24 CDT 2008
Nuno Lopes wrote:-
> /// expression. The generalization of the wording to include any subexpression
> /// that is not evaluated (C99 6.6p3) means that nonconstant subexpressions
> /// can appear as operands to other operators (e.g. &&, ||, ?:). For instance,
> -/// "0 || f()" can be treated as a constant expression. In C90 this expression,
> +/// "1 || f()" can be treated as a constant expression. In C90 this expression,
> /// occurring in a context requiring a constant, would have been a constraint
> /// violation. FIXME: This routine currently implements C90 semantics.
> /// To properly implement C99 semantics this routine will need to evaluate
1 || f()
is never a constant expression.
More information about the cfe-commits