Why are typedef identifiers allowed to be declared multiple times?

后端 未结 3 1163
醉梦人生
醉梦人生 2020-12-05 15:41

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

3条回答
  •  攒了一身酷
    2020-12-05 16:13

    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.

提交回复
热议问题