Remember that you are compiling individual object files. In you last example, your resultant d.o file says to create a global array named MyArray, but it doesn't know the size. This .o file could, in theory, be linked to any object file that contains a definition of MyArraySize. This means that the size of MyArray could be different depending on the object file d.o is linked to. Because d.o will allocate memory, it needs to know exactly how much to allocate at compile time. That's why the size must be constant and known when the array is declared.