+exprNode exprNode_compoundStatementExpression (/*@only@*/ lltok tlparen, /*@only@*/ exprNode e)
+{
+ exprNode laststmt;
+
+ DPRINTF (("Compound: %s", exprNode_unparse (e)));
+
+ if (!context_flagOn (FLG_GNUEXTENSIONS, exprNode_loc (e)))
+ {
+ (void) llgenhinterror
+ (FLG_SYNTAX,
+ message ("Compound statement expressions is not supported by ISO C99"),
+ message ("Use +gnuextensions to allow compound statement expressions (and other GNU language extensions) "
+ "without this warning"),
+ exprNode_loc (e));
+ }
+
+ /*
+ ** The type of a compoundStatementExpression is the type of the last statement
+ */
+
+ llassert (exprNode_isBlock (e));
+ laststmt = exprNode_lastStatement (e);
+
+ DPRINTF (("Last statement: %s / %s", exprNode_unparse (laststmt), ctype_unparse (exprNode_getType (laststmt))));
+ DPRINTF (("e: %s", exprNode_unparse (e)));
+ e->typ = exprNode_getType (laststmt);
+ return exprNode_addParens (tlparen, e);
+}
+
+