Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: offsetof (was Arithmetic on NULL) Message-ID: <9105@mimsy.UUCP> Date: Mon, 26-Oct-87 09:38:50 EST Article-I.D.: mimsy.9105 Posted: Mon Oct 26 09:38:50 1987 Date-Received: Thu, 29-Oct-87 21:21:53 EST References: <1459@cullvax.UUCP> <48400001@tub.UUCP> <1151@haddock.ISC.COM> <907@sugar.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 18 >>In article <1076@jenny.cl.cam.ac.uk> am@cl.cam.ac.uk (Alan Mycroft) writes: >>|... ANSI (Oct 86) specifically disallows unary-& from appearing in >>|constant expressions .... In article <907@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: >Does this mean the following use of & in &STD_Gadget[n], which is being >used in a context that requires a constant expression, is not ANSI standard? [Example in which & is legal according to K&R, but not according to the aforementioned draft ANS.] It *was* not, but the committee appears to be reinstating K&R rules: that an expression that reduces to a previously declared global or static variable, optionally with an integer constant offset, is a constant expression. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris