https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88175

--- Comment #14 from Jonny Grant <jg at jguk dot org> ---
Wondering, if there is an implicitly created copy-constructor, can the warning
clarify that? Perhaps there is some attribute or flag set so later code can
know it was implicitly created?

eg output could be:

$ g++ -O2 -Werror=uninitialized -o header header.cpp
header.cpp: In function ‘void test(info_t)’:
header.cpp:10:10: error: ‘copy.info::registered’ is used uninitialized in
implicitly created copy-constructor function for struct info::info()
[-Werror=uninitialized]
     temp = copy;
     ~~~~~^~~~~~
cc1plus: some warnings being treated as errors

Reply via email to