lsym_offsetof.c revision 1.3
1/* $NetBSD: lsym_offsetof.c,v 1.3 2022/04/22 21:21:20 rillig Exp $ */ 2 3/* 4 * Tests for the token lsym_offsetof, which represents the keyword 'offsetof' 5 * that starts an expression for computing the offset of a member in a struct. 6 */ 7 8#indent input 9size_t offset = offsetof(struct s, member); 10#indent end 11 12#indent run-equals-input 13#indent run-equals-input -bs 14 15/* 16 * The option '-pcs' forces a blank after the function name. That option 17 * applies to 'offsetof' as well, even though it is not really a function. 18 */ 19#indent run -pcs 20size_t offset = offsetof (struct s, member); 21#indent end 22