This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Serious error-causing change in new CPP's -traditional behavior



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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]