From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F3CD73858D32; Mon, 8 May 2023 16:49:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3CD73858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683564541; bh=Eoop1GMKvKMNHTvm2Q9JsPxKyE8sIX0eIJd5EKVBWTk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=R8nFRs6KEYtO5ptH9i6M0yJJuTB9zRM6qxuQh94shxSwhWBwzSkV+ZRW/o+ViVVr3 8FAcwSlHmL22fLny4lMwT7xy0q3LknCsZQd2wYXAgVgrXps2ix57ooChpCqZqJaJN8 bzK3ndaHVQ8ok/mMGGdFwB1lYGQUyIusJgzFMss0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109775] gcc misidentifies a VLA Date: Mon, 08 May 2023 16:49:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: dependson 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=3D109775 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |61259 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > Here is another related testcase: > ``` > typedef int T; > void naimul(const T v_[2]) > { > int i =3D 0; > T pp(T(v_[0])+0); > } > ``` > We get an -pedantic-error dealing with 0 sized array: > : In function 'void naimul(const T*)': > :5:13: error: ISO C++ forbids zero-size array 'v_' [-Wpedantic] > 5 | T pp(T(v_[0])+0); > | ^ That is recorded as PR 61259 . Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61259 [Bug 61259] [10/11/12/13/14 Regression] Spurious "ISO C++ forbids zero-size array" warning with -pedantic=