代码:
#include <stdio.h>
int test(){
int a = ({
int aa = 0;
int bb = 1;
int cc = 2;
if(aa == 0 && bb == 1)
printf("aa = %d, bb = %d\n", aa, bb);
//return -2;
cc;
});
return a;
}
int main(){
typeof(4) a = test();
printf("a = %d\n", a);
}
//结果输出:
//aa = 0, bb = 1
//a = 2