Hello,

Ralph Castain, le Wed 10 Sep 2014 17:41:17 -0700, a écrit :
> Just got this from Clang 3.4.2 on Linux x86-64:
> 
> In file included from topology-x86.c:23:
> /home/common/openmpi/svn-trunk/opal/mca/hwloc/hwloc191/hwloc/include/private/
> cpuid-x86.h:67:3: warning: extension used [-Wlanguage-extension-token]
>   asm(
>   ^
> 1 warning generated.
> 
> 
> Guess it doesn't like that assembler in there

Could you try the attached patch?

Samuel
diff --git a/include/private/cpuid-x86.h b/include/private/cpuid-x86.h
index f00a97f..1abf172 100644
--- a/include/private/cpuid-x86.h
+++ b/include/private/cpuid-x86.h
@@ -16,7 +16,7 @@ static __hwloc_inline int hwloc_have_x86_cpuid(void)
 {
   int ret;
   unsigned tmp, tmp2;
-  asm(
+  __asm__(
       "mov $0,%0\n\t"   /* Not supported a priori */

       "pushfl   \n\t"   /* Save flags */
@@ -64,7 +64,7 @@ static __hwloc_inline void hwloc_x86_cpuid(unsigned *eax, 
unsigned *ebx, unsigne
    * use them :/ */
 #ifdef HWLOC_X86_64_ARCH
   hwloc_uint64_t sav_rbx;
-  asm(
+  __asm__(
   "mov %%rbx,%2\n\t"
   "cpuid\n\t"
   "xchg %2,%%rbx\n\t"
@@ -73,7 +73,7 @@ static __hwloc_inline void hwloc_x86_cpuid(unsigned *eax, 
unsigned *ebx, unsigne
     "+c" (*ecx), "=&d" (*edx));
 #elif defined(HWLOC_X86_32_ARCH)
   unsigned long sav_ebx;
-  asm(
+  __asm__(
   "mov %%ebx,%2\n\t"
   "cpuid\n\t"
   "xchg %2,%%ebx\n\t"

Reply via email to