[cfe-commits] r53174 - in /cfe/trunk: lib/AST/Expr.cpplib/Sema/SemaDecl.cpp test/Sema/compound-literal.c

Nuno Lopes nunoplopes at sapo.pt
Mon Jul 7 15:57:01 PDT 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.

Ah, you're right, I misread it as '1 && f()'. I'll revert it.

Thanks,
Nuno 




More information about the cfe-commits mailing list