public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98044] New: Last line always highlighted as error in constructor initializer list when another is bogus
@ 2020-11-28 15:07 gcc at linkmauve dot fr
  2020-11-28 17:39 ` [Bug c++/98044] " redi at gcc dot gnu.org
  2020-11-28 17:40 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: gcc at linkmauve dot fr @ 2020-11-28 15:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98044
           Summary: Last line always highlighted as error in constructor
                    initializer list when another is bogus
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at linkmauve dot fr
  Target Milestone: ---

Created attachment 49641
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49641&action=edit
Testcase reproducing this badly-placed error

When a constructor has an initializer list with one being bogus, the error
doesn’t point to the correct line but always to the last one.

In the attached testcase, g++ correctly identifies foo(1, 2) as the culprit,
but highlights bar() as the error:

testcase.cpp:13:8: error: no matching function for call to ‘Foo::Foo(int, int)’
   13 |  , bar()

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/98044] Last line always highlighted as error in constructor initializer list when another is bogus
  2020-11-28 15:07 [Bug c++/98044] New: Last line always highlighted as error in constructor initializer list when another is bogus gcc at linkmauve dot fr
@ 2020-11-28 17:39 ` redi at gcc dot gnu.org
  2020-11-28 17:40 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-28 17:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is a dup of another bug, which has already been fixed for GCC 11.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/98044] Last line always highlighted as error in constructor initializer list when another is bogus
  2020-11-28 15:07 [Bug c++/98044] New: Last line always highlighted as error in constructor initializer list when another is bogus gcc at linkmauve dot fr
  2020-11-28 17:39 ` [Bug c++/98044] " redi at gcc dot gnu.org
@ 2020-11-28 17:40 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-28 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
found it

*** This bug has been marked as a duplicate of bug 94024 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-28 17:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-28 15:07 [Bug c++/98044] New: Last line always highlighted as error in constructor initializer list when another is bogus gcc at linkmauve dot fr
2020-11-28 17:39 ` [Bug c++/98044] " redi at gcc dot gnu.org
2020-11-28 17:40 ` redi at gcc dot gnu.org

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).