C++ parser refusing asm statatement

Jan Hubicka jh@suse.cz
Mon Jan 13 05:17:00 GMT 2003


Hi,
now with fixed xmmintrin.h I am almost able to compile it with C++.
However this looks like parser bug:
hubicka@kampanus:/aux/hubicka/egcs2/gcc/build/gcc$ ./g++ -B ./ -O2 t.C
-msse2
In file included from t.C:1:
include/xmmintrin.h: In function `void _mm_pause()':
include/xmmintrin.h:1064: error: expected string-literal
include/xmmintrin.h:1064: error: expected `('
include/xmmintrin.h:1064: error: expected primary-expression
include/xmmintrin.h:1064: error: expected `)'
t.C:5: error: expected `;'
t.C:5: error: expected `}'

line in question is
static __inline void
_mm_pause (void)
{
  __asm__ __volatile__ ("rep; nop" : : );
}
that looks valid to me.
t.C:
#include <xmmintrin.h>
main()
{
}



More information about the Gcc-bugs mailing list