This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Serious error-causing change in new CPP's -traditional behavior
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: Serious error-causing change in new CPP's -traditional behavior
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Thu, 11 May 2000 17:03:46 +0100
- Cc: Neil Booth <NeilB at earthling dot net>, thorpej at zembu dot com, gcc-bugs at gcc dot gnu dot org
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
zack@wolery.cumb.org said:
> What I believe he wants is more along the lines of this patch.
> Richard, care to give it a spin?
Actually, there is one case which is still not ideal
What I would like to have is
#define wibble(foo) mov r0, # foo
.text
a:
wibble(4)
and get the output
.text
a:
mov r0, #4
Unfortunately we get
mov r0, "4"
which is not what was intended. I suspect this is really just a trap for
the unwary, since it can be worked around with your
#define IMMED(n) # ##n
trick, or even done directly:
#define wibble(foo) mov r0, # ## foo
or even
#define wibble(foo) mov r0, #(foo)
provided parentheses are acceptable (which they are in my case).
R.