From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E66873858004; Fri, 31 Mar 2023 19:52:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E66873858004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680292351; bh=ivUTYFN0PzuSVPZWcWsH/a6SxbQS0Y4GzCU8Fgnzr8k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j9SzwaFmp0oNOMhsn1iImFgUYcgq1MDHj5Hx+U2IiQ2PPbG5UKOqKyMUB6mtixDLJ +Whm7VbK0UiccpDrqCEhJE4boiw42DZfqFFQzRG1rgDE56B9bA4FASPpdSAUDrpuSU TQIAocwH79IeaHVR1s47VC4mFNfGc6Dh0fYEaXoI= From: "jg at jguk dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109356] Enhancement idea to provide clearer missing brace line number Date: Fri, 31 Mar 2023 19:52:31 +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.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jg at jguk dot 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=3D109356 --- Comment #2 from Jonny Grant --- (In reply to Xi Ruoyao from comment #1) > I believe attempting to doing so would result exponential time complexity. Ah ok, I didn't realise it would be complex. I don't know enough about the internals, I was just thinking it could use t= he [2] to know that it had got 2 elements, and that } closing brace was needed before the comma. ie. :5:10: error: expected '}' before ',' token 5 | {"E", "F", | ^ Or I thought it could just count the number of braces, and when it got to t= he 3rd open brace { ie. :6:2: error: expected '}' before '{' token 5 | {"E", "F", | ^=