[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: preprocessor/2883: cpp stringizing problem 1



On Sun, May 20, 2001 at 08:44:32PM +0200, Markus F.X.J. Oberhumer wrote:
> $ gcc-3.0 -c -Werror bug02.c
> bug02.c:13:23: pasting ""_"" and ""foo"" does not give a valid preprocessing
> token
...
> #define ASM_NAME(x)     __asm__("_" ## #x)

A string literal can't form a new preprocessing token by catenation with another.
This warning is correct.  Instead you should write:

#define ASM_NAME(x)     __asm__("_" #x)

-- 
Carlo Wood <carlo@alinoe.com>



Reply to: