From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E35B23851C17; Sat, 6 Jun 2020 20:42:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E35B23851C17 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591476133; bh=nXzOakGyE57IOFVLJ501A45foz4jsPt+nQ8VSIkO6xc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KsDCiQv+94HQxabQNqx4QjzHQ42VMEgGaXptTnPtjhCcpIxyeNw8zQ4Wop+s9CKZA 7zOSHn9lQiodANLq1ERUkMP0qRXRycLzJniCmSb0sACsR1cz98gVL4eCicdM6XCRq7 Vw/X3mEBJ5psTAjFrL5DBl6MhKobzTTLTTE6bdjU= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95512] gcc/fortran/trans-decl.c:1066: array sanity check after use Date: Sat, 06 Jun 2020 20:42:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2020 20:42:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95512 --- Comment #4 from David Binderman --- (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.=