From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 771483858CDB; Fri, 31 Mar 2023 10:00:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 771483858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680256833; bh=A5S2+rkJEy6HpxFic3fgGekt3gNvrspN87BdsL0RoRY=; h=From:To:Subject:Date:From; b=VosMoaHxpVT/gbwR7h1qqF3XUurwrcwOekknBHIE3hdNdiHVJDpbzXWhdjVC39fkV JoYzxEfytUZx30HEOI/Zxhtg+bGe02X5ToVXDsd5BIyJS8nq/CboLggMcqR0C/mSdR 99ZMJt0CVDtytYFGlwQbh6aa5BEXO3OmN0Vejfw0= From: "jg at jguk dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109356] New: Enhancement idea to provide clearer missing brace line number Date: Fri, 31 Mar 2023 10:00:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 109356 Summary: Enhancement idea to provide clearer missing brace line number Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jg at jguk dot org Target Milestone: --- Sometimes due to human error there is a missing brace. Enhancement idea to provide the missing brace line number. Is that possible? Godbolt trunk gcc does show there is an error, but doesn't pick out line 5. Would be great if it could https://godbolt.org/z/nE13h1r13 :8:2: error: expected '}' before ';' token 8 | }; | ^ :2:1: note: to match this '{' 2 | { | ^ :8:2: error: too many initializers for 'const char* [2]' 8 | }; | ^ static const char * list[][2] =3D { {"A", "B"}, {"C", "D"}, {"E", "F", {"G", "H"}, {"I", "J"} }; int main() { }=