tech-toolchain archive

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

Re: Avoiding traditional CPP for assembler

On Fri, Jan 07, 2011 at 10:51:46PM +0100, Joerg Sonnenberger wrote:
> > 
> > We could also __CONCAT(,) and __STRING()... but I guess that's ugly.
> No, we can't. Nesting macros doesn't work. That's what I was looking at
> first, but e.g. the interrupt vectors in x86 are created by macros and
> that plays havoc with __CONCAT. It's the reason why so much stuff in
> machine/asm.h is duplicated for __STDC__ and !__STDC__.

It should work, sometimes you need an extra 'relay' #define in order
to get the substitutions to happen in the right order.


David Laight:

Home | Main Index | Thread Index | Old Index