Passing an address to a #define in C

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

 



Hi All:

I need to pass the address of label1 (that is, the address of statement a =
b + 20;) to a #define, such as the following code shows:

#define LOAD(x)     (x<<4);


void func1(void) {
int a, b=10;
......
label1:
    a = b + 20;
    LOAD(label1);
....
}

However, it seems like it only works in GCC if goto(label1) instruction is
used... Is there any other way to do this?


Thanks in advance!
Gus


-- 
View this message in context: http://old.nabble.com/Passing-an-address-to-a--define-in-C-tp31890487p31890487.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux