[cfe-dev] cpp difference between gcc and clang?
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Jul 7 07:49:40 PDT 2011
Hi,
RTEMS uses preprocessed assembly files (.S).
I have a small test case which compiles
with i386 gcc and not with clang from the svn
head.
========================
#define __USER_LABEL_PREFIX__
#define EXPAND0(x) x
#define CONCAT0(a,b) EXPAND0(a)EXPAND0(b)
#define SYM(x) CONCAT0 (__USER_LABEL_PREFIX__, x)
.text
.set RUNCONTEXT_ARG, 4 /* save context argument */
.set HEIRCONTEXT_ARG, 8 /* restore context argument */
SYM(_label):
nop
========================
$ clang -c set_asm.S
/tmp/cc-Y6Q2YB.s:14:24: error: unexpected token in assignment
.set HEIRCONTEXT_ARG, 8_label:
This is a cut down and if I simplify it much more,
it works.
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the cfe-dev
mailing list