[Bug c++/79572] [6/7 Regression] Segfault with -O1 and higher on null reference
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 17 11:06:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |trippels at gcc dot gnu.org
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
You can use -fno-delete-null-pointer-checks as a workaround for this issue.
But the C++ standard makes it very clear that references cannot be null,
otherwise you're invoking undefined behavior.
More information about the Gcc-bugs
mailing list