[X86] Add __extension__ to f16c macro intrinsics to suppress warnings about compound...
authorCraig Topper <craig.topper@sifive.com>
Sat, 11 Jun 2022 15:28:41 +0000 (08:28 -0700)
committerCraig Topper <craig.topper@sifive.com>
Sat, 11 Jun 2022 15:34:37 +0000 (08:34 -0700)
This had previously been fixed, but was lost 4 years ago when __extension__
was removed from many intrinsic macros.

Refixes PR32491.

clang/lib/Headers/f16cintrin.h

index 13905e6..94a662c 100644 (file)
@@ -65,9 +65,9 @@ _cvtsh_ss(unsigned short __a)
 ///    011: Truncate \n
 ///    1XX: Use MXCSR.RC for rounding
 /// \returns The converted 16-bit half-precision float value.
-#define _cvtss_sh(a, imm) \
-  ((unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \
-                                                     (imm)))[0]))
+#define _cvtss_sh(a, imm) __extension__ ({ \
+  (unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \
+                                                     (imm)))[0]); })
 
 /// Converts a 128-bit vector containing 32-bit float values into a
 ///    128-bit vector containing 16-bit half-precision float values.