This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Passing an address to a #define in C
- From: GusSabina <gussabina at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 20 Jun 2011 17:21:08 -0700 (PDT)
- Subject: 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.