the address of local labels

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

 



  not strictly speaking a kernel question, but i noticed that most
architectures define a macro to generate the current text address
using a local label:

  #define current_text_addr() ({ __label__ _l; _l: &&_l;})

now, maybe i'm confused by the syntax, but that looks like what's
being returned by the statement expression is the "address of the
address of _l".  is that right?  why would you need to use *two*
address-of operators, rather than just one?  just curious how this
actually works.  thanks.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

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