This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Two small i?86 *intrin* warning fixes
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Jan 2014 18:52:10 +0100
- Subject: [PATCH] Two small i?86 *intrin* warning fixes
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
While looking at some other PR, I've stripped line notes and got
pr59947.ii.bak:26330:74: error: ISO C++ forbids declaration of â_mm512_mask_cvtusepi64_storeu_epi32â with no type [-fpermissive]
_mm512_mask_cvtusepi64_storeu_epi32 (void* __P, __mmask8 __M, __m512i __A)
^
pr59947.ii.bak: In function âfloat _cvtsh_ss(short unsigned int)â:
pr59947.ii.bak:30674:65: warning: narrowing conversion of â__Sâ from âshort unsigned intâ to âshort intâ inside { } [-Wnarrowing]
__v8hi __H = __extension__ (__v8hi){ __S, 0, 0, 0, 0, 0, 0, 0 };
^
warnings that would normally only show up with -Wsystem-headers.
Especially the second one looks like one worth fixing.
Ok for trunk?
2014-01-30 Jakub Jelinek <jakub@redhat.com>
* config/i386/f16cintrin.h (_cvtsh_ss): Avoid -Wnarrowing
warning.
* config/i386/avx512fintrin.h (_mm512_mask_cvtusepi64_storeu_epi32):
Add missing return type - void.
--- gcc/config/i386/f16cintrin.h.jj 2014-01-03 11:41:06.000000000 +0100
+++ gcc/config/i386/f16cintrin.h 2014-01-30 18:47:28.780037184 +0100
@@ -37,7 +37,7 @@
extern __inline float __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_cvtsh_ss (unsigned short __S)
{
- __v8hi __H = __extension__ (__v8hi){ __S, 0, 0, 0, 0, 0, 0, 0 };
+ __v8hi __H = __extension__ (__v8hi){ (short) __S, 0, 0, 0, 0, 0, 0, 0 };
__v4sf __A = __builtin_ia32_vcvtph2ps (__H);
return __builtin_ia32_vec_ext_v4sf (__A, 0);
}
--- gcc/config/i386/avx512fintrin.h.jj 2014-01-28 14:03:49.000000000 +0100
+++ gcc/config/i386/avx512fintrin.h 2014-01-30 18:45:41.867595415 +0100
@@ -4840,7 +4840,7 @@ _mm512_cvtusepi64_epi32 (__m512i __A)
(__mmask8) -1);
}
-extern __inline
+extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtusepi64_storeu_epi32 (void* __P, __mmask8 __M, __m512i __A)
{
Jakub