S
Sam Steingold
The following code:
#define DEF3 DEF4
#define DEF2 DEF3
#define DEF1 DEF2
#define STRING(x) #x
#define SHOW(x) puts("#define " #x " " STRING(x))
void main () {
SHOW(DEF1);
SHOW(DEF2);
SHOW(DEF3);
SHOW(DEF4);
}
prints
#define DEF1 DEF4
#define DEF2 DEF4
#define DEF3 DEF4
#define DEF4 DEF4
what I want is to see that DEF1 is originally defined to DEF2.
Is there a way to get
#define DEF1 DEF2
printed, instead of
#define DEF1 DEF4
(i.e., I am getting the behavior of Lisp macroexpand,
while what I want is macroexpand-1 instead,
see http://www.lisp.org/HyperSpec/Body/fun_macroexpa_acroexpand-1.html)
Thanks!
PS. I also try to post to comp.lang.c.moderated,
but it does not appear there...
#define DEF3 DEF4
#define DEF2 DEF3
#define DEF1 DEF2
#define STRING(x) #x
#define SHOW(x) puts("#define " #x " " STRING(x))
void main () {
SHOW(DEF1);
SHOW(DEF2);
SHOW(DEF3);
SHOW(DEF4);
}
prints
#define DEF1 DEF4
#define DEF2 DEF4
#define DEF3 DEF4
#define DEF4 DEF4
what I want is to see that DEF1 is originally defined to DEF2.
Is there a way to get
#define DEF1 DEF2
printed, instead of
#define DEF1 DEF4
(i.e., I am getting the behavior of Lisp macroexpand,
while what I want is macroexpand-1 instead,
see http://www.lisp.org/HyperSpec/Body/fun_macroexpa_acroexpand-1.html)
Thanks!
PS. I also try to post to comp.lang.c.moderated,
but it does not appear there...