[Bug middle-end/88175] Showing header file instead of source code line for uninitialized variable

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 24 00:38:00 GMT 2018


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonny Grant from comment #4)
> Also, it is "copy" that is unused uninitialized? (not "temp")

Yes, in the test(info_t) function, which is what GCC says:

header.h: In function ‘void test(info_t)’:
header.h:8:16: error: ‘copy.info::registered’ is used uninitialized in this
function


But not in main(). There it's temp that's uninitialized, as GCC says:

header.h: In function ‘int main()’:
header.h:8:16: error: ‘temp.info::registered’ is used uninitialized in this
function


More information about the Gcc-bugs mailing list