Re: Strange variable declarations in Kernel

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

 



On Fri, Sep 02, 2005 at 10:33:27PM +0530, Manu Anand wrote:

> Hi Paul:
> 
> This is a GCC extension. For example 
> 
> struct file_operations fops = {
> read: device_read,
> write: device_write,
> open: device_open,
> release: device_release
> };
> 
> The ANSI way of doing the same is 
> struct file_operations fops = {
> .read = device_read,
> .write = device_write,
> .open = device_open,
> .release = device_release
> };

Pauls question is about bitfields (that are part of C89).

Your example is about structure initialization that is something 
completely different.

> HTH
> Manu
>...

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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