https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |redi at gcc dot gnu.org --- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This changed with PR53210. See e.g. https://gcc.gnu.org/legacy-ml/gcc-patches/2012-09/msg00898.html Though, not sure how else we could avoid the warning. void bar (int); static inline int baz (void) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wuninitialized" #pragma GCC diagnostic ignored "-Winit-self" int u = u; return u; #pragma GCC diagnostic pop } void foo (void) { int u = baz (); bar (u); } certainly doesn't work, what works is to make the -Wuninitialized diagnostic ignored at the use side, but that is incompatible with how _mm*_undefined* intrinsics are meant to be used. Note, the above (in particular the first diagnostic ignored alone) pragma helps to shut the warning up in clang. Though, for the intrinsic headers we care just about gcc.