[Bug c++/2972] -Wuninitialized could warn about uninitialized member variable usage in constructors
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 2 09:54:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=2972
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> ---
I have a fix for this, incremental over the PR79345 one.
t.C: In constructor ‘A::A()’:
t.C:7:11: warning: ‘*<unknown>.A::g’ is used uninitialized in this function
[-Wuninitialized]
f = g;
^
comes at the cost of initializing pointer-based refs as opposed to only
var-based (so this cost can be non-trivial).
More information about the Gcc-bugs
mailing list