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

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to