This revision was automatically updated to reflect the committed changes. Closed by commit rG2d18a86d14a9: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224 (authored by pengfei).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124916/new/ https://reviews.llvm.org/D124916 Files: clang/lib/Headers/cetintrin.h Index: clang/lib/Headers/cetintrin.h =================================================================== --- clang/lib/Headers/cetintrin.h +++ clang/lib/Headers/cetintrin.h @@ -43,8 +43,11 @@ } static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd_i32() { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wuninitialized" unsigned int t; return __builtin_ia32_rdsspd(t); +#pragma clang diagnostic pop } #ifdef __x86_64__ @@ -53,8 +56,11 @@ } static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq_i64() { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wuninitialized" unsigned long long t; return __builtin_ia32_rdsspq(t); +#pragma clang diagnostic pop } #endif /* __x86_64__ */
Index: clang/lib/Headers/cetintrin.h =================================================================== --- clang/lib/Headers/cetintrin.h +++ clang/lib/Headers/cetintrin.h @@ -43,8 +43,11 @@ } static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd_i32() { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wuninitialized" unsigned int t; return __builtin_ia32_rdsspd(t); +#pragma clang diagnostic pop } #ifdef __x86_64__ @@ -53,8 +56,11 @@ } static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq_i64() { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wuninitialized" unsigned long long t; return __builtin_ia32_rdsspq(t); +#pragma clang diagnostic pop } #endif /* __x86_64__ */
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits