Vladimir Ljaschko (16.11.2010 17:42 - 17:44, просмотров: 363) ответил rezident на А можно подробнее? Мнится мне, что тут простое недопонимание стандарта языка Си.
Может быть, только совсем недавно мы с компилятором понимали одинаково. Про линкер я загнул - все происходит при компиляции модуля. Некорректность вижу только в неиспользовании typedef. #define SETUP_STRUCT \
struct \
{ unsigned int backup[BackupQty]; \
unsigned int enable1_ [uQty][uEnableQty]; \
char modem[ModemCharsQty]; \
unsigned int service_stat[ssQty]; }
extern __no_init union
{ SETUP_STRUCT;
unsigned int setup_int[SetupWordsQty];
unsigned char setup_char[SetupSize];
};
Error[Pe101]: "_A_backup" has already been declared in the current scope (at line 553 of "D:\Work\Type H\k800uni_backup.h") D:\Work\Type H\k800uni_backup.c 75
Error[Pe101]: "backup" has already been declared in the current scope (at line 550 of "D:\Work\Type H\k800uni_backup.h") D:\Work\Type H\k800uni_backup.c 72
Error[Pe101]: "enable1_" has already been declared in the current scope (at line 550 of "D:\Work\Type H\k800uni_backup.h") D:\Work\Type H\k800uni_backup.c 72
Error[Pe101]: "modem" has already been declared in the current scope (at line 550 of "D:\Work\Type H\k800uni_backup.h") D:\Work\Type H\k800uni_backup.c 72
Error[Pe101]: "service_stat" has already been declared in the current scope (at line 550 of "D:\Work\Type H\k800uni_backup.h") D:\Work\Type H\k800uni_backup.c 72
Error[Pe101]: "setup_int" has already been declared in the current scope (at line 551 of "D:\Work\Type H\k800uni_backup.h") D:\Work\Type H\k800uni_backup.c 73
Error[Pe101]: "setup_char" has already been declared in the current scope (at line 552 of "D:\Work\Type H\k800uni_backup.h") D:\Work\Type H\k800uni_backup.c 74
Error while running C/C++ compiler