From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BEDCF3857B98; Fri, 31 Mar 2023 10:02:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEDCF3857B98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680256921; bh=zN90O1T+X7y7pcJ4YPuYOI/OzUjkl9aXSxzr9qCIXgU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yxyoHnp2xUC9vYbxSGb0EvZLs8a2VuziRFL9TDwgm3ZfCjAmUMGoTDCoa9WW6uorc ppSy9i5/WuUA9Yq0+jb4dumtUedpigiLKDWm6cgh8FJZbx/2OjON/sC0hAtEQNd6id +hJRPsWcQimm78LDjiU2gzxjqGlF/nD83Y78dHHI= From: "dcrocker at eschertech dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105523] Wrong warning array subscript [0] is outside array bounds Date: Fri, 31 Mar 2023 10:02:00 +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: dcrocker at eschertech 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: cc 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 David Crocker changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcrocker at eschertech dot= com --- Comment #16 from David Crocker --- This issue is not specific to AVR target. I get the same spurious warning f= rom gcc 12.2 arm-none-eabi when I compile the following code for ARM Cortex M0+= and M4 targets: const char *bootloaderVersionText =3D *reinterpret_cast(0x20); I haven't found a workaround other than to use a pragma to disable the warn= ing for that line of code.=