1 dec 2008 kl. 21.41 skrev Eli Friedman:
On Mon, Dec 1, 2008 at 9:25 PM, Anders Carlsson <[EMAIL PROTECTED]> wrote:1 dec 2008 kl. 14.26 skrev Neil Booth:Anders Carlsson wrote:-1 dec 2008 kl. 04.33 skrev Eli Friedman:On Sun, Nov 30, 2008 at 10:27 PM, Anders Carlsson <[EMAIL PROTECTED] >wrote:Author: andersca Date: Mon Dec 1 00:27:38 2008 New Revision: 60331 URL: http://llvm.org/viewvc/llvm-project?rev=60331&view=rev Log: Fix test. (0 && (a(),1)) is a valid I-C-E according to C99.No, it isn't. Note the requirement about operands; "a" is a global,which isn't allowed.Ah, I see - I got ICEs and regular constant expressions mixed up.The 'a' is not permitted in a "regular constant expression" either.Hmm, why not?Well, "a" itself is a legal constant expression, but the expression as a whole isn't in one of the four forms allowed in C99 6.6p7.
You mean"Constant expressions shall not contain assignment, increment, decrement, function-call, or comma operators, except when they are contained within a subexpression that is not
evaluated"Since (a(), 1) is not evaluated because of the 0 &&, it's allowed to have the function call and comma operator there, unless I'm missing something trivial :)
Anders
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
