linux-mips
[Top] [All Lists]

Re: structure initialization

To: Jerry <jerry@wicomtechnologies.com>
Subject: Re: structure initialization
From: Thiemo Seufer <ths@networkno.de>
Date: Fri, 22 Jul 2005 15:49:46 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <1663025994.20050722163929@wicomtechnologies.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1663025994.20050722163929@wicomtechnologies.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.9i
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

<Prev in Thread] Current Thread [Next in Thread>