Path: utzoo!attcan!uunet!crdgw1!underdog!volpe From: volpe@underdog.crd.ge.com (Christopher R Volpe) Newsgroups: comp.std.c Subject: Re: static int x[2], *p = x+(x-x); ? Message-ID: <11941@crdgw1.crd.ge.com> Date: 17 Sep 90 16:03:23 GMT References: <1990Sep14.015241.2152@twinsun.com> <2699@rossignol.Princeton.EDU> <11907@crdgw1.crd.ge.com> <2752@rossignol.Princeton.EDU> Sender: news@crdgw1.crd.ge.com Reply-To: volpe@underdog.crd.ge.com (Christopher R Volpe) Lines: 13 In article <2752@rossignol.Princeton.EDU>, drh@cs.Princeton.EDU (Dave Hanson) writes: [in regard to: static int *s = x + (x-x); ] |>x-x indeed evaluates to 0 during execution, but compilers are not |>obliged to recognize it as a constant expression that evaluates to 0 |>during compilation. x-x is not an integral constant expression because |>its operands are address constants, not integer constants (see sec. 3.4). Yup. Right. Sorry. ================== Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com