1 /* $NetBSD: d_gcc_compound_statements2.c,v 1.3 2021/04/23 20:13:29 rillig Exp $ */ 2 # 3 "d_gcc_compound_statements2.c" 3 4 /* GCC compound statements with non-expressions */ 5 struct cpu_info { 6 int bar; 7 }; 8 9 int 10 compound_expression_with_decl_and_stmt(void) 11 { 12 return ({ 13 struct cpu_info *ci; 14 __asm__ volatile("movl %%fs:4,%0":"=r" (ci)); 15 ci; 16 })->bar; 17 } 18 19 int 20 compound_expression_with_only_stmt(void) 21 { 22 struct cpu_info ci = { 0 }; 23 return ({ 24 if (ci.bar > 0) 25 ci.bar++; 26 ci; 27 }).bar; 28 } 29