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

Re: __CONCAT



On Mon, Mar 20, 2006 at 04:41:22PM +0100, Robert Millan wrote:
> On Mon, Mar 20, 2006 at 04:03:21PM +0100, Petr Salinger wrote:
> > >
> > >Anyone has an idea on why gcc only expands __CONCAT once?
> > 
> > I think it is due to 
> > http://developer.apple.com/documentation/developertools/gcc-4.0.1/cpp/Argument-Prescan.html
> > 
> > "If an argument is stringified or concatenated, the prescan does not occur."
> > 
> > As original FreeBSD <sys/cdefs.h> have
> > 
> > #define __CONCAT1(x,y)  x ## y
> > #define __CONCAT(x,y)   __CONCAT1(x,y)
> > 
> > the solution for libfreebsd might be to put at the end of <bsd/cdefs.h>
> > 
> > #undef __CONCAT
> > #define __CONCAT1(x,y)  x ## y
> > #define __CONCAT(x,y)   __CONCAT1(x,y)
> 
> The header in question is using the standard (glibc) <sys/cdefs.h>.  Do you
> think we can fix it there? (I.e. with upstream consentment)

Btw, does __STRING need this fix too?

-- 
Robert Millan



Reply to: