From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C953385DC13; Sun, 12 Apr 2020 23:37:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C953385DC13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586734665; bh=0IcgzMU7zBwKIr6xgHAgzZgZgOW+P380S78sr8hvPbM=; h=From:To:Subject:Date:From; b=MZ5EBBemUAPKImuufLTTpcrfnptSmaPYH6kpNVxFM/21pxceznHcyJ4KJAH7L1KaL MMlzO7yptktXjCsTZ5JaZsE2m5AiC04RXUFIKhnUSTz3/JcKE/Zyj3kiH98zk/Bej4 eT84ZD5W9ISUghHS3YgvublAEk2KTJv51eGoEVsw= From: "bisqwit at iki dot fi" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94571] New: Error: Expected comma or semicolon, comma found Date: Sun, 12 Apr 2020 23:37:45 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bisqwit at iki dot fi 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 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: Sun, 12 Apr 2020 23:37:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94571 Bug ID: 94571 Summary: Error: Expected comma or semicolon, comma found Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bisqwit at iki dot fi Target Milestone: --- void foo() { int test1[2], test2[2]; auto [a,b] =3D test1, [c,d] =3D test2; } The error message given for this (invalid) C++17 code is a bit confusing. tmp.cc: In function =E2=80=98void foo()=E2=80=99: tmp.cc:4:23: error: expected =E2=80=98,=E2=80=99 or =E2=80=98;=E2=80=99 bef= ore =E2=80=98,=E2=80=99 token 4 | auto [a,b] =3D test1, [c,d] =3D test2; You expected comma, found comma. So what is the problem? The proper error message would be to only expect a semicolon.=