From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 63C3F3858C66; Mon, 8 May 2023 16:13:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63C3F3858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683562412; bh=YEW9QFa5tjuOEA39HZ7+4juQLzWEjvd9b7yBjH9xAmk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t/9bPc1UuHyTi1qiCWN/ELA0Zt7II9A2HZoevWfA81VEZoQfJyjwGUKlJRtJl0ph+ h1fTj9t/BGuZthPNJ9o3Aug8HoDwTHOdmvTg11pE0uUumckdkr2EBNZJT6O1FleZ5C m99wyewGvZDsuU+62HB9DI6C360Qgsy7fmiiOQko= 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:13:32 +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: UNCONFIRMED 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=3D109775 --- Comment #1 from Andrew Pinski --- It has to do with parsing here: GCC starts parsing it as a function declaration and then backs out but had already warned/errored out about the VLA. If you change the code to: D const pp{D(v_[i]) * o.v_[S - i]}; Then there is no ambiguity in parsing this.=