以下是對typedef修改的一些實驗,我無法理解2行和6行。爲什麼2和5會有不同的結果? 請給我一些澄清。Typedef更改行爲導致錯誤和警告
typedef long _long;
extern _long tl; //1 Fine...OK
extern _long int tli; //2 extraneous `int' ignored...??
extern int _long til; //3 `_long' does not name a type...OK
extern long l; //4 Fine...OK
extern long int li; //5 Fine...OK
extern int long il; //6 Fine...??
首先,不要使用具有前導下劃線的全局名稱,它們由規範保留。 –
只是一句話:'long x;','long int x;'和'int long x;'都等價 –
是的,我在這裏只是爲了方便閱讀。 –