Re: question about __v annotation

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

 



On Sun, Jan 03, 2010 at 11:49:09AM -0500, Anand Arumugam wrote:
>    I think the last __v; inside the macro is to avoid compiler warning or
>    error that the unsigned 8-bit variable __v is not being used inside the
>    scope defined by the macro.

That's incorrect. The GNU C literature states that a compound statement
enclosed in parentheses may appear as an expression.

As a previous poster pointed out, the expansion of the readb macro is a
compound statement which is surrounded by parentheses and is therefore an
expression that evaluates to the value of the last subexpression in the
compound statement : in this case the value of __v.

See <http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html> for more
information.

Cheers,
Robin

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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