From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 94A98386189F; Fri, 3 Jul 2020 11:05:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94A98386189F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593774351; bh=ESsNz6QI26FPvp1VhzQwU7C8F3aFhHbaIu3qhZ8jVMk=; h=From:To:Subject:Date:From; b=dXpdulKtJQQ0O+k0/h1oaC0/oBZCBVEceTdmGAN4hhQkfNd2SOWOe8PE8uleirKCv 8YlGkdaxMgwPhfnoBNWqznlzqj0Ab9dEnbiQmbFPO8fGJhxSIVua0W+kLySr54yLwP yxbEkQ7zTkCgaopTwZNzdba2H1SQdYBilnCWUXtE= From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96045] New: Wrong line and column diagnostic message in a class template instantiation Date: Fri, 03 Jul 2020 11:05:51 +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: 11.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: haoxintu at gmail dot com 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 keywords 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: Fri, 03 Jul 2020 11:05:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96045 Bug ID: 96045 Summary: Wrong line and column diagnostic message in a class template instantiation Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- This simple code, bug.cc, GCC-trunk can not emit the right diagnostic information. $cat bug.cc template class A {}; struct A =20 $g++ -c bug.cc bug.cc:3: error: expected unqualified-id at end of input Noted that the number 3 is not a line number nor a column number. While in Clang $clang++ -c bug.cc bug.cc:2:16: error: expected unqualified-id struct A =20 ^ 1 error generated. $g++ --version g++ (GCC) 11.0.0 20200630 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=