Re: question about __v annotation

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

 



On Mon, Jan 04, 2010 at 05:08:03PM -0500, Anand Arumugam wrote:
>    The purpose of the macro is served even without the last __v; statement.
>    But the last statement __v; enables the macro to be used as rvalue (as
>    described in many replies) in an expression.
>
>    Without the last statement __v; at the end of the macro the compiler will
>    issue a warning/error for the unused variable __v within the scope defined
>    by { ... } and an error if the macro is used as rvalue.

True. The point is that we _want_ to use the macro as an rvalue and
hence the need to have the last '__v;' statement. Use of the macro as an
lvalue would work fine but result in a warning without this statement,
as you correctly point out.

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