[Bug c/98630] Seg-fault when using a goto after condition (if)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 12 10:43:42 GMT 2021


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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The reason why C++ has it as hard error is I think object
construction/destruction, in C the warning is for code to be portable to C++,
in plain C it is all about making sure variables are initialized, which users
can do correctly even if they cross variable initialization.
So in C there is nothing wrong per se on the crossing, just the warning can
help if -Wuninitialized or -Wmaybe-uninitialized has false negatives as in this
case.


More information about the Gcc-bugs mailing list