public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "haoxintu at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-96045-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96045

            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> class A {};
struct A <int> 

$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 <int> 
               ^
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.

             reply	other threads:[~2020-07-03 11:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 11:05 haoxintu at gmail dot com [this message]
2020-07-08 21:54 ` [Bug c++/96045] [11 Regression] " mpolacek at gcc dot gnu.org
2020-07-08 21:57 ` mpolacek at gcc dot gnu.org
2020-10-16 11:54 ` rguenth at gcc dot gnu.org
2020-12-22 20:49 ` jason at gcc dot gnu.org
2020-12-22 21:00 ` nathan at gcc dot gnu.org
2020-12-23 22:26 ` cvs-commit at gcc dot gnu.org
2020-12-26 19:51 ` cvs-commit at gcc dot gnu.org
2021-01-28 16:07 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-96045-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).