This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Passing an address to a #define in C


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]