E
effbiae
hi,
this code:
#define M(a,b) static int is[3]={a,b;
M(1,(2,3)})
produces this (using gcc -E):
static int is[3]={1,(2,3)};
which gcc does not complain about.
my question(s):
o is there a better way of passing a comma separated list as the 'b'
parameter
o is gcc being generous by
a) preprocessing this
b) compiling it
o how can i write a macro like this:
#define F(a,b) int a(obj*o b
so that i can write function declarations in which all functions have a
first param obj, but may optionally have more.
thanks,
jack
ivorykite.com
this code:
#define M(a,b) static int is[3]={a,b;
M(1,(2,3)})
produces this (using gcc -E):
static int is[3]={1,(2,3)};
which gcc does not complain about.
my question(s):
o is there a better way of passing a comma separated list as the 'b'
parameter
o is gcc being generous by
a) preprocessing this
b) compiling it
o how can i write a macro like this:
#define F(a,b) int a(obj*o b
so that i can write function declarations in which all functions have a
first param obj, but may optionally have more.
thanks,
jack
ivorykite.com