|
From: | Rob |
Subject: | Re: [Tinycc-devel] code block expression |
Date: | Mon, 24 Feb 2014 21:06:20 +0000 (GMT) |
User-agent: | Alpine 2.02 (DEB 1266 2009-07-14) |
On 24/02/14, Sylvain BERTRAND wrote:
Hi, Is there on-going effort to add the support of code block expression? a = ({int b; b = 10; b +=1; b;}); BTW, is this valid C code or an extension? (I'm not a compiler writer, yet).
$ cat expr-stmt.c main() { int a = ({int b; b = 10; b +=1; b;}); return a; } $ tcc -run expr-stmt.c $ echo $? 11 Seems fine to me? It's a GNU extension btw [1] Rob 1: http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
[Prev in Thread] | Current Thread | [Next in Thread] |