[amirus] GCC не компилит

  • From: 4afc <ml@xxxxxxx>
  • To: All <amirus@xxxxxxxxxxxxx>
  • Date: Tue, 12 Sep 2006 01:05:14 +0400

Hello All,

Подскажите почему у меня иногда не компилятся следующие примеры:
//========= File TST.c Start ==================
typedef struct {
char A,B,C;
} MyStruct_t;

int main(int argc, char **argv)
{
char A,B,C;
struct MyStruct_t *MyS;

MyS=(MyStruct_t *)malloc(sizeof(MyStruct_t));

A=MyS->A;

free(MyS);
}
//========= File TST.c End ==================

4afc:> gcc -c TST.c
TST.c: In function `main':
TST.c:10: warning: assignment from incompatible pointer type
TST.c:12: dereferencing pointer to incomplete type

Причём любой другой GCC (QNX, AVR,ARM) съедает только так...


-- 
Best regards,
 4afc                          mailto:ml@xxxxxxx


Other related posts: