This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How "tagged initialization format" works?
- From: Falk Hueffner <falk at debian dot org>
- To: "Chen,Xi" <xichen at sjtu dot edu dot cn>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 14 Mar 2005 14:12:50 +0100
- Subject: Re: How "tagged initialization format" works?
- References: <4235893F.3050909@sjtu.edu.cn>
"Chen,Xi" <xichen@sjtu.edu.cn> writes:
> I'm looking into Linux kernel source and have found some
> declarations like that:
>
> static struct file_operations apm_bios_fops = {
> .owner = THIS_MODULE,
> .read = do_read,
> .poll = do_poll,
> .ioctl = do_ioctl,
> .open = do_open,
> .release = do_release,
> };
>
> After refering to Linux Device Driver 2nd Edtion, I got a term --
> "tagged initialization format". The only thing I could figure out from
> this book is that, this is an extension of GCC and it can enhance the
> portability of structure definitions. However when I tended to GCC
> infopage, I could hardly find a word about that?
It's not an extension, it's part of the current C standard from
1999. It wasn't part of the previous C standard from 1989 though.
--
Falk