Re: structure initialization

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

 



Jerry wrote:
> 
> A kind of lame offtopic question :)
> What reason in 2.6 to do structure init in this way:
>  struct a = {
>   .name = value
> ...
> 
> instead of 2.4-like:
>  struct a = {
>   name: value
> ...
> 
> Is this a bad form to use ".name" in 2.4 or "name:" in 2.6?

name: is the obsolete GNU gcc extension, .name = is C99. The C99 style
is strongly preferred now.


Thiemo


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux