Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!mips!prls!pyramid!amdahl!jcv From: jcv@uts.amdahl.com (Jim Veroulis) Newsgroups: comp.lang.c Subject: C standard question Message-ID: <02qC021la43S01@amdahl.uts.amdahl.com> Date: 3 May 90 20:14:32 GMT Reply-To: jcv@tde.uts.amdahl.com (Jim Veroulis) Organization: Amdahl Corporation, Sunnyvale CA Lines: 28 I have a question regarding the ANSI C standard. Consider the following program: ---------------------------cut here--------------------------- char x[]; main() { x[0] = 'x'; printf("x[0] = %c\n", x[0]); } ---------------------------cut here--------------------------- According to my interpretation of section 3.7.2 (I have draft X3.159) because this translation unit contains no external definition for "x" (as defined in section 3.7.2) the behavior is as if the declaration for "x" were written as: char x[] = 0; which would imply that storage would need to be reserved for x, as opposed to assuming that some other translation unit will do it. Does this seem like a reasonable interpretation? Jim P.S. I'm only concerning myself with this for completeness sake. I certainly have no plans to exploit such a feature. :-)