[comp.lang.c] C standard question

jcv@uts.amdahl.com (Jim Veroulis) (05/04/90)

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. :-)