[Bug fortran/95512] gcc/fortran/trans-decl.c:1066: array sanity check after use
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Jun 6 20:42:13 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95512
--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to anlauf from comment #3)
> I didn't write the code, but for more context:
Thanks for the extra context.
> Maybe it is bad style, but I still consider it a false positive.
If you go back and check what cppcheck is saying, it is merely
mentioning what it thinks is bad style.
> cppcheck's view is probably too narrow to understand the range of dim.
Agreed. AFAIK cppcheck merely searches and reports
on source code patterns like
if (arrayName[ X] && X < someExpression)
Whether you want to keep the code in bad style is up to you.
I did originally suggest some code that looked IMHO to be better style.
More information about the Gcc-bugs
mailing list