3.7.13. Statement expressions

Statement expressions enable you to place whole sections of code, including declarations, within braces ({ }) .

The result of a statement expression is the final item in the statement list.

Example

int bar(int b, int foo)
{
    if (({
             int y = foo;
             int z;

             if (y > 0) z = y;
             else z = -y;
             z>b;
         }))
    b++;
    return b;
}
Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential