# inside a macro body
From: Miki Tebeka (miki.tebeka_at_zoran.com)
Date: 09/27/04
- Next message: pete: "Re: Sizeof(X) on different architectures"
- Previous message: Joona I Palaste: "Re: Is this valid C statement?"
- Next in thread: S.Tobias: "Re: # inside a macro body"
- Reply: S.Tobias: "Re: # inside a macro body"
- Reply: Arthur J. O'Dwyer: "Re: # inside a macro body"
- Maybe reply: Derrick Coetzee: "Re: # inside a macro body"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Sep 2004 03:51:34 -0700
Hello All,
We're using in-house C pre processor for Assembly development.
We'd like to move to a standard "C" pre processor (such as gcc's "cpp").
However we have the following problem:
Out assembly code have the following syntax:
move #2, d1;
How can I write a macro that will produce the above line?
If I try:
#define mv(reg) move #2, reg;
I get (for cpp -E):
f:1:23: '#' is not followed by a macro parameter
I've tried with ## and \# but it doesn't work.
Is there a way around this?
Thanks.
Miki
- Next message: pete: "Re: Sizeof(X) on different architectures"
- Previous message: Joona I Palaste: "Re: Is this valid C statement?"
- Next in thread: S.Tobias: "Re: # inside a macro body"
- Reply: S.Tobias: "Re: # inside a macro body"
- Reply: Arthur J. O'Dwyer: "Re: # inside a macro body"
- Maybe reply: Derrick Coetzee: "Re: # inside a macro body"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]