From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 892473858013; Tue, 6 Feb 2024 21:35:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 892473858013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707255326; bh=oYM0puvhfY/LNBFl0tkR53mPc2cMGYFanHxpkng5mZQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=g6vsL0Jg+1aVu8APytE/PBa88HikGyx/LL895DdItm2tUQ7cs+/uQa/ZpR3mMmkkF VZKmzwfnOLrc8y9mGcVzCmqbMSMKZNr9tiFwN9vvm9w1bRyjOOVGLxsWEyxpf6GykS EFQbLJeNocqdeiqWM9hmMhsPRJazB8MiCnXG+E3o= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113788] Deducing this is broken with structured binding Date: Tue, 06 Feb 2024 21:35:24 +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: 14.0 X-Bugzilla-Keywords: accepts-invalid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub 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=3D113788 --- Comment #5 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:40485378ade83102d7aa30c317f5d6c90c1d232b commit r14-8832-g40485378ade83102d7aa30c317f5d6c90c1d232b Author: Jakub Jelinek Date: Tue Feb 6 22:34:55 2024 +0100 c++: Disallow this specifier except for parameter declarations [PR11378= 8] The deducing this patchset added parsing of this specifier to cp_parser_decl_specifier_seq unconditionally, but in the C++ grammar this[opt] only appears in the parameter-declaration non-terminal, so rather than checking in all the callers of cp_parser_decl_specifier_seq except for cp_parser_parameter_declaration that this specifier didn't appear I think it is far easier and closer to what the standard says to only parse this specifier when called from cp_parser_parameter_declaration. 2024-02-06 Jakub Jelinek PR c++/113788 * parser.cc (CP_PARSER_FLAGS_PARAMETER): New enumerator. (cp_parser_decl_specifier_seq): Parse RID_THIS only if CP_PARSER_FLAGS_PARAMETER is set in flags. (cp_parser_parameter_declaration): Or in CP_PARSER_FLAGS_PARAME= TER when calling cp_parser_decl_specifier_seq. * g++.dg/parse/pr113788.C: New test.=