https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116697
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-09-13 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. The diagnostic is emitted from the frontend. I don't think it can see the inline function just returns an address to the uninitialized object but in C++ layman terms calling a methond on an object constitutes an acceess to it. #0 warning_at (location=316487, opt=875, gmsgid=0x3b33c20 "member %qD is used uninitialized") at ../../src/gcc/gcc/diagnostic-global-context.cc:171 #1 0x0000000001013e67 in find_uninit_fields_r (tp=0x7fffffffcfb0, walk_subtrees=0x7fffffffce98, data=0x7fffffffd190) at ../../src/gcc/gcc/cp/init.cc:915