From the C99 standard, 6.7(5):
A declaration specifies the interpretation and attributes of a set of identifiers. A definition of an identifier is a d
Your program compiles without error because your compiler is being lax (or compiling for a different standard). If I compile your code with gcc 4.4.7 then it in fact does report an error about the redefinition of x.