A query about typeof

contemplating zombie contemplatingzombie at gmail.com
Sat Dec 24 13:34:27 EST 2011


Hi,

I see following code in kfifo.h

typeof((fifo) + 1) __tmp = (fifo);
[http://lxr.linux.no/linux+v3.1.6/include/linux/kfifo.h#L334]

I do not understand this specific code construct. Why is it necessary
to add 1 to fifo before getting its type?
Is it related to some 'C' magic?

-ctmzb



More information about the Kernelnewbies mailing list