[cfe-dev] cpp difference between gcc and clang?

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Jul 7 09:06:54 PDT 2011


Please file a bug report.

-Argiris

On Jul 7, 2011, at 7:49 AM, Joel Sherrill wrote:

> 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
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list