[Bug tree-optimization/104082] Wdangling-pointer: 2 * false positive ?
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jan 18 09:00:33 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104082
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> >I've no idea why the warning is generated, the code looks legal to me
>
> The warning is generated even though the code is valid, if someone
> deferences metricp after the call to s88, the code becomes undefined.
A warning for valid code is IMHO really bad.
It would be a better warning if it only happened when the pointer
is dereferenced.
As is, I've got to find every occurrence of this warning and manually
check for a problem. I think 90% of the time, it going to be legal code.
> Why the warning is duplicated I have no idea.
Righto.
More information about the Gcc-bugs
mailing list