Author: Craig Topper Date: 2022-06-11T08:34:37-07:00 New Revision: ff80dc85449307d90e5276cd8f41825ace9b8594
URL: https://github.com/llvm/llvm-project/commit/ff80dc85449307d90e5276cd8f41825ace9b8594 DIFF: https://github.com/llvm/llvm-project/commit/ff80dc85449307d90e5276cd8f41825ace9b8594.diff LOG: [X86] Add __extension__ to f16c macro intrinsics to suppress warnings about compound literals This had previously been fixed, but was lost 4 years ago when __extension__ was removed from many intrinsic macros. Refixes PR32491. Added: Modified: clang/lib/Headers/f16cintrin.h Removed: ################################################################################ diff --git a/clang/lib/Headers/f16cintrin.h b/clang/lib/Headers/f16cintrin.h index 13905e6fb0ec..94a662c1d93a 100644 --- a/clang/lib/Headers/f16cintrin.h +++ b/clang/lib/Headers/f16cintrin.h @@ -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. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits