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