From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 20A043983A56; Wed, 16 Sep 2020 19:20:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20A043983A56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600284028; bh=hhUeCoxBN37IZM12pTnrQdyrQ6ZK1lADdK/inkh2cRk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ryEZuUE0AnnITtWUTVnfWyjNG+Gtr/CqioE8iHdbt5DGP5hF8XlwtYxxS2V/TgJnm AIZIgM6d60sY/7rhT3TcxViene25QnZPuLy6sSrMta5pDSAQaAYqvQeLmURdIaeFGk kyx+9jQDJ8FmgzX6Q144Z/hLEdxRmbDVWHN80KpM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94571] Error: Expected comma or semicolon, comma found Date: Wed, 16 Sep 2020 19:20:27 +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: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2020 19:20:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94571 --- Comment #7 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:a43981bb51fd0b8e68452faea6ec160cbea058e5 commit r9-8879-ga43981bb51fd0b8e68452faea6ec160cbea058e5 Author: Jakub Jelinek Date: Thu Apr 16 07:19:57 2020 +0200 c++: Fix pasto in structured binding diagnostics [PR94571] This snippet has been copied from the non-structured binding declaration parsing later in the function, and while for non-structured bindings it can be followed by comma or semicolon, structured bindings may be only followed by semicolon. Or, do we want to have a different message for the case when there is a comma (and keep this corrected one only if there is something else) that would explain better what is the bug (or add a fix-it hint)? Marek said in the PR that clang++ reports error: decomposition declaration must be the only declaration in its gr= oup There is another thing Marek noted (though, something for different spo= t), that diagnostic for auto x(1), [e,f] =3D test2; could also use a clearer wording like the above (or a fix-it hint), but the question is if we sh= ould assume [ after , as a structured binding or if we should do some tentat= ive parsing first to figure out if it looks like a structured binding. 2020-04-16 Jakub Jelinek PR c++/94571 * parser.c (cp_parser_simple_declaration): Fix up a pasto in diagnostics. * g++.dg/cpp1z/decomp51.C: New test. (cherry picked from commit e4658c7dbbe88f742c96e5f58ee4a6d549d642ca)=