From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 538043858D37; Mon, 10 Oct 2022 19:53:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 538043858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665431629; bh=0OQAnsY3GzAF2OYIYd6ly/+K2nOIuwQlqtPNbNcnemU=; h=From:To:Subject:Date:From; b=yqnvEp0ClkTUUCcotv1+snDY/p9+4FfQfy1Rt63nzpKHIb1y/NNGkkvuo2BQTLdgI S/Lm6WHZzhUgGA4MP+8wSLcoFiw7e4eC2b+ZMotvn0xowCocQ4a30J0n9h7S1Xt/yU K3EOrowco+22G3PaOS2y84B2nyl8y3CTjQT4cWhA= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/107203] New: Possible missing sanity check in gofrontend/ast-dump.cc ? Date: Mon, 10 Oct 2022 19:53:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107203 Bug ID: 107203 Summary: Possible missing sanity check in gofrontend/ast-dump.cc ? Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: dcb314 at hotmail dot com Target Milestone: --- Static analyser cppcheck says: trunk.git/gcc/go/gofrontend/ast-dump.cc:267:8: warning: Missing bounds check for extra iterator increment in loop. [StlMissingComparison] Source code is ++it; (*it)->dump_expression(this); I will ignore the dubious benefits of incrementing iterators in loops, and just mention that a sanity for bounds might be wise before using=20 the iterator.=