Tentative defs, type compatibility.
Alan Mycroft
am at cl.cam.ac.uk
Thu May 25 19:20:03 AEST 1989
Consider the following dpANS C program:
int x[10];
int x[] = { 1,2 };
Does the x[10] and x[] get unified together before the initialisation of
x[10] to {1,2,0,0,...} or does the initialisation of x to (int[2]){1,2}
happen first and cause a type conflict with x[10]?
I can see arguments both way (more programs are legal vs. lack of
symmetry -- most other top-level declarations are order-independent), but
the dpANS does not immediately explain. Views?
More information about the Comp.std.c
mailing list