lsym_offsetof.c revision 1.2
11.2Srillig/* $NetBSD: lsym_offsetof.c,v 1.2 2021/11/19 22:24:29 rillig Exp $ */
21.1Srillig/* $FreeBSD$ */
31.1Srillig
41.1Srillig/*
51.1Srillig * Tests for the token lsym_offsetof, which represents the keyword 'offsetof'
61.1Srillig * that starts an expression for computing the offset of a member in a struct.
71.1Srillig */
81.1Srillig
91.1Srillig#indent input
101.2Srilligsize_t		offset = offsetof(struct s, member);
111.1Srillig#indent end
121.1Srillig
131.1Srillig#indent run-equals-input
141.2Srillig#indent run-equals-input -bs
151.2Srillig
161.2Srillig/*
171.2Srillig * The option '-pcs' forces a blank after the function name.  That option
181.2Srillig * applies to 'offsetof' as well, even though it is not really a function.
191.2Srillig */
201.2Srillig#indent run -pcs
211.2Srilligsize_t		offset = offsetof (struct s, member);
221.2Srillig#indent end
23