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

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
A pointer to a local variable is indeterminate when returned from the function
and using it undefined.  GCC substitutes null for such pointers to avoid
accidentally clobbering the stack (this was disabled in r273261 by adding
#pragma GCC optimize ("no-isolate-erroneous-paths-dereference" near line 26 in
the file; I raised this bug for the record).  Rather than disabling the GCC
transformation (which also avoids the warning) I would recommend considering an
alternate solution.

Reply via email to