From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9BE50382FCA7; Fri, 9 Dec 2022 19:22:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BE50382FCA7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670613761; bh=4eaXYlyT8a3za91u73ufPd4wcmtYPDD9/JRU6HzSA9M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=b0trrl/f98M5LWIFbTZF1schqrXBWKKNYDkpLViPBz9pdBMEhnTEh+u1GmJJk/Cxc AzqIfRmj5ie/4Ae204rl1gXveV0r7h15fdaL0YLhnnbZptb406RKYMp/sEAQRfKjmL 4Zj/GZE7/4fVQVjXF0ft+twP6bsaFY/iEb/B1JkQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108036] [11/12/13 Regression] Spurious warning for zero-sized array parameters to a function Date: Fri, 09 Dec 2022 19:22:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: 11.4 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=3D108036 --- Comment #4 from Andrew Pinski --- (In reply to Alejandro Colomar from comment #3) > - In the reduced test case, you call the pointer to one past the end as > 'end'. That is misleading, since 'end' is commonly also used for pointers > to the last byte in an array, normally the NUL byte in strings.=20 In the C++ standard, the function end() returns one past the last element o= f an array. So I am not misusing the name end here. Just using it different from you.=