Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!edg1!jsa From: jsa@edg1.UUCP (J. Stephen Adamczyk) Newsgroups: comp.std.c Subject: Legal forms of constant expressions in initializers Keywords: constant-expression initializer Message-ID: <339@edg1.UUCP> Date: 7 Jul 89 16:22:01 GMT Organization: Edison Design Group, Inc., Edison, NJ Lines: 19 By my reading of section 3.4, both of the following examples are not legal: /* 1 */ static int i = "abc"[2]; /* 2 */ static int a[5]; static int j = &a[3] - &a[2]; The second example, in particular, is interesting, since by my reading K&R (first edition) allows it, and the pcc-based compiler on my Sun does too. Anyone feel these are legal? Have I read the text wrong? Steve Adamczyk uunet!edg1!jsa (201) 769-8262