Re: Gcc4 and Kernel build

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

 



--- Bernd Petrovitsch <bernd@xxxxxxxxx> wrote:

> [ You break threading BTW ]
> On Sat, 2006-05-06 at 16:38 +0100, Ashok Sharma
> wrote:
> > --- Bernd Petrovitsch <bernd@xxxxxxxxx> wrote:
> > > On Fri, 2006-05-05 at 15:44 +0100, Ashok Sharma
> > > wrote:
> > > [...]
> > > > The reason is that GCC does not recognise some
> > > > obsolete code like the following 
> > > >
> > > >  struct x y[]
> [....]
> > > which is plain simply wrong since this was and
> is
> > > 100% legal C-code.
> > > Read and understand the error message.
> [...]
> > Do visit the link given below
> > 
> >
>
http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-02/4663.html
> 
> Yes. Did you follow the link there to
> http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html?
> 
> So gcc's error message is 
> ----  snip  ----
> [...]: error: array type has incomplete element type
> ----  snip  ----
> 
> So one declares an array without the declaration of
> the struct before.
> Before apparently gcc tolerated this (and issued
> eventually a warning)
> and gcc-4>whatever> now issues an error there.
> So the solution is to #include the .h file with the
> declaration (or do
> whatever is approriate to get the compiler to know
> the struct).




> 
> And I can't find any hint or reason why arrays of
> struct should no
> longer be declarable (where pointers to arrays of
> structs are).
> 
> 	Bernd


Blame it on the Standards - (if I remember correctly)
newer ANSI C standard has made this change - I read
somewhere but am not able to get the Link now - 

Best
Ashok




> -- 
> Firmix Software GmbH                  
> http://www.firmix.at/
> mobil: +43 664 4416156                 fax: +43 1
> 7890849-55
>           Embedded Linux Development and Services
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux
> kernel.
> Archive:      
> http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 


Send instant messages to your online friends http://uk.messenger.yahoo.com 

--
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