array type has incomplete element type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I install FC4 today, and I want to compile a clean kernel. I compile linux kernel 2.6.11 in FC4.
Gcc version is 4.0.0 20050519 (Red Hat 4.0.0-8)
Kernel is 2.6.11-1.1369_FC4

And I got a error in include/linux/i2c.h
include/linux/i2c.h:58: error: array type has incomplete element type
include/linux/i2c.h:197: error: array type has incomplete element type

Now I have got the problem.
example code:

struct str_temp;
struct str_temp first;
struct str_temp second[2];
struct str_temp {
char cha;
int ib;
};
main(){
return;
}

when you compile these code in gcc 4.0, you would get a error.
but if you remove the array definition(struct str_temp second[2];),
the error would go away.

So, what's the problem?
why gcc 4.0 produce this error?

Thanks a lot. Forgive my poor english expression.

Derry





--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux