From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 44ACF384A027; Thu, 16 Apr 2020 05:20:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44ACF384A027 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587014444; bh=qLM64JLQ1lzKf91W6ROJJjB5nJkhQcqE2UN7046fTRc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yS+wwx4ezL6sxLsTcTadvfnv1DGlrAZ8TpXAHEUzmZGjRc5EiURCqEcdkbjF18xIP A6ZQQqbe3YsEF9ri1atzJ1qm8NPqvT2ta4Tk2po/9VPpkA8NedhZvhw/EYm1klx43n MhbK6R61KyA/77lBYlGUnPkE0EeQZ9nNEOMJ+0PI= 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: Thu, 16 Apr 2020 05:20:44 +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: Thu, 16 Apr 2020 05:20:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94571 --- Comment #6 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:e4658c7dbbe88f742c96e5f58ee4a6d549d642ca commit r10-7745-ge4658c7dbbe88f742c96e5f58ee4a6d549d642ca 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.=