From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8335F3858D39; Tue, 25 Apr 2023 07:46:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8335F3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682408769; bh=a1mPFIsiOgiREbmGFd3bgta5x6YFDUfYrBjSMaJY6WI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S/t74CfvNWI7LRVc4OJ2nIghbXc/hjCrs4nO5iPBJflyeuHZub/Tzb/zNzi41+QwK 1A45VoZknKe3b5CtjgxkiDVt4jhhIIQ8rca2Zsp4VsIocCJsEAJtTlPj/qWS6mIi80 LEbcGmApvibrJqVbcfP6WINaq7u/trKBs8Qa8Rjk= From: "david at westcontrol dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105523] Wrong warning array subscript [0] is outside array bounds Date: Tue, 25 Apr 2023 07:46:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: david at westcontrol dot com X-Bugzilla-Status: NEW 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105523 --- Comment #23 from David Brown --- (In reply to LIU Hao from comment #22) > Yes, GCC should be told to shut up about dereferencing artificial address > values. One possibility is to have the warnings disabled whenever you are using a volatile pointer. After all, "volatile" is an indication that the compiler doesn't know everything, and it has to trust the programmer.=