https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83468
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|-Wuninitialized warning not |-Wuninitialized false |emitted when it should |negative (reference, VOPs | |at O0, Wsystem-headers) --- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- It should warn at -O0 for passing q to test2, specially because there is no inlining. Simpler testcase: class klass { public: void test2(double k); public: void test3(double& k); }; int main(int argc, const char** argv) { double q; klass* ptr; ptr = new klass(); ptr->test2(q); ptr->test3(q); ptr->test2(q); } It warns if one removes the call to test3. This is because we don't handle VOPs in they early pass and the call to test3 converts q to one. There's also the other issue with inlining code from Wsystem-headers.