3334 This declaration of '%s' hides a more global declaration.ide
extern int press; void foo(void) { float press; /* Message 3334 */ }
3448 Declaration of typedef '%s' is not in a header file although it is used in a definition or declaration with external linkage.spa
typedef int TYPE; /* Message 3448 */ extern TYPE foo(void); /* Message 3447 */ extern TYPE foo(void) { return 1; }
1525 Object/function with external linkage has same identifier as another object/function with internal linkage.code
file1.cpp ======= extern int contr; // Message 1525 file2.cpp ======= static int contr; // Message 1525
這種寫法是合法的,可是不建議這麼寫,若是上述代碼寫在同一個文件中,會報錯。blog
1526 Object with no linkage has same identifier as another object/function with external linkage.重名錯誤rem
file1.cpp ======= extern int remake; // Message 1526 file2.cpp ======= void foo(void) { int remake; // Message 1526 ... }
1527 Object/function with internal linkage has same identifier as another object/function with internal linkage.it
file1.cpp ======= static int cra; // Message 1527 file2.cpp ======= static int cra; // Message 1527
這麼寫合法,可是不建議這麼寫io
1528 Object with no linkage has same identifier as another object/function with internal linkage.function
file1.cpp ======= static int cra; // Message 1528 file2.cpp ======= void foo(void) { int cra; // Message 1528 ... }